c# - ASP.NET Web APi - Passing an object as parameter -
makeuser method in user controller creating username , password. [httpget] public string makeuser(userparameters p) { const string chars = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz0123456789"; string pass = ""; random r = new random(); (int = 0; < p.number; i++) { pass += chars[r.next(0, 62)]; } string firsttwoo = p.name.substring(0, 2); string firstthree = p.surname.substring(0, 3); return "your username is: " + firsttwoo + firstthree + "\nyour password is: " + pass; } userparameter class sending parameters object. public class userparameters { public int number { get; set; } public string name { get; set; } public string surname { get; set; } } runasync method in console client. can pass object method? if yes mistake here? thank you! ...