不能使用实例引用访问成员‘<Method>’
namespace MyDataLayer{ namespace Section1 { public class MyClass { public class MyItem { public static string Property1{ get; set; } } public static MyItem GetItem() { MyItem theItem = new MyItem(); theItem.Property1 = "MyValue"; return theItem; } } } }
using MyDataLayer.Section1;public class MyClass{ protected void MyMethod { MyClass.MyItem oItem = new MyClass.MyItem(); oItem = MyClass.GetItem(); someLiteral.Text = oItem.Property1; }}
Property1
Equals
, GetHashCode
, GetType
ToString
oItem.Property1
Member
MyDataLayer.Section1.MyClass.MyItem.Property1.get cannot be accessed with an instance reference, qualify it with a type name instead
慕森卡