Need help appending a variable in C#

  • Thread starter Thread starter Gadepalli.Vinny
  • Start date Start date
G

Gadepalli.Vinny

Guest
Hello All,

I'm new to C#. I'm having trouble appending a variable in C#. Can you please help me.

Below is what I have so far.
Current Output

{"Alias":"TomC","Location":"USA"}


Desired Output:

{"Name":"Tom Cruice","Alias":"TomC","Location":"USA"}


I basically need to add "Name":"Tom Cruice", to the variable.

using System;
using System.Data;
using System.IO;
using System.Linq;
using System.Text;

namespace Test
{
static class Program
{
static void Main()
{
string Alias = "TomC";
string Name = "Tom Cruice";
string Location = "USA";

var BaseTest = @"{""Alias"":""TomC"",""Location"":""USA""}";
string Test = BaseTest;

Console.WriteLine(BaseTest);
Console.ReadLine();
}
}
}

Continue reading...
 

Similar threads

P
Replies
0
Views
176
Policy standard local admin account with Active Di
P
Back
Top