Suraj Kaushik's Blog

2 share my mistakes and lessons

code path returns a value error

Compiler Error Message: CS0161: ‘users.login(string, string)’: not all code paths return a value

Not All code paths retun a value. comes when we set any function to return any kind of datatype value other than void as Line 25:     public string login(string userid, string pwd) above funciton must return string value in every case, no matter if it returns a blank string. Hence, if you din’t check every [...]

, , ,