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...
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...