I have the following C# method:
private string[] test()
{
}
I would like to know if I can do something like this within the method:
return {"1","2"}
instead of:
string[] quantity = { "1","2" };
return quantity;
Kindly let me know how I can do this in C#.
return new string[] { "1", "2" };
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With