public string GetData(int id, [FromUri] string value) { string s = ""; var b = new ConvertToBinary(); if (value != null) { if (id == 1) { s = b.ToBinary(value); } else { s = b.ToText(value); } } else { Console.WriteLine("This is a friendly message...Your object is null"); //s = "This is a friendly message...Your object is null"; } return(s); }
public string GetData(int id, [FromUri] string value) { string s = ""; var b = new ConvertToBinary(); if (value != null) { if (id == 1) { s = b.ToBinary(value); } else { s = b.ToText(value); } } else { Console.WriteLine("This is a test"); } return(s); }
public int Test(int n) => ConvertToBinary.ToBinary(n);