Understanding C# property syntax and getters/setters -
i coming on java world , construct driving me nuts:
private static string _muiurl; private static string muiurl { { if (string.isnullorempty(_muiurl)) { using (var db = new intlmpdb()) { _muiurl = (from c in db.control c.controlkey == "mui_url" select c.controlvalue).firstordefault(); } } return _muiurl; } }
when see in class , want use property in class itself, how should call it?
simply follows:
var result = typewithmuiurlproperty.muiurl;
you can omit class name mentioned others, however, explicitness leave in example.
Comments
Post a Comment