Hi
In below code i want to pass value dynamic instead of hard coded value - 321483788811
var body = @"{" + "\n" +
@" ""awbs"": [" + "\n" +
@" ""321483788811""," + "\n" +
@" ""NMBC0001789312""" + "\n" +
@" ]" + "\n" +
@"}";
Thanks
Munib ButtPosted Jan 12, 2023, 8:37 PM
Simply use the $"string" with placeholders option as below:
var value1 = "Test";
var val = $"This is a test value = {value1}";
Console.WriteLine(val);
Using C#11
Jignesh KumarPosted Jan 12, 2023, 4:21 AM
Hi Ramco,
You can use string interploation as $ and do as below to pass dynamic parameter,
Uday DodiyaPosted Jan 11, 2023, 10:30 AM
Try Following
Or Create function for body like following
Amit MohantyPosted Jan 11, 2023, 9:44 AM
Try this
How to call