How can I use get to return a boolean from a C# class? -
i have following:
public class content { public string partitionkey { get; set; } public string rowkey { get; set; } ... } public class contentviewmodel { public string rowkey { get; set; } public content content { get; set; } public boolean userowkey { } }
can tell me how can code in userowkey read , return true if content.rowkey first character "x".
how can use return boolean c# class?
you can not because classes have no return value, methods have (and properties - method special case of method).
now:
can tell me how can code in userowkey read , return true if content.rowkey first character "x"
but not "returning boolean class", know.
public bool userowkey { { return rowkey.startswith("x"); }}
(untested, may have debug)
read only: not provide set. first char x: programming.
Comments
Post a Comment