public class CellPhoneMessagingController : ApiController
{
[HttpGet]
[Route("api/CellPhoneMessaging/{code}")]
public string burgers(string code)
{
string userCode = code;
char[] ch = new char[userCode.Length];
for (int i = 0; i < ch.Length; i++) {
ch[i] = userCode[i];
}
return ch;
}
}
I tried this but it is not returning the ch. Note: I am new in programming.
string, but you're returning achar[].return new string(ch);