c# - How to return IEnumerable type as object -
i have var (ienumerable) wanted return class.
public myclass method(string str) { ................... var p1 = data; return ? } public class myclass { public string { get; set; } public string b { get; set; } public bool c { get; set; } ........................... }
my intention return values through webapi. return webapi, created model class containts variable want return through webapi- 'myclass'
actually, var not type, rather keyword, c# staticly typed mean compiler run on program , each var decide real type
so question, know type of data need write return type (dont lazy :))
read bit more issue here
Comments
Post a Comment