jjzjj

MyAttribute

全部标签

c# - 接口(interface)上的属性

我有一个接口(interface),它定义了一些带有属性的方法。这些属性需要从调用方法中访问,但我拥有的方法不会从接口(interface)中提取属性。我错过了什么?publicclassSomeClass:ISomeInterface{MyAttributeGetAttribute(){StackTracestackTrace=newStackTrace();StackFramestackFrame=stackTrace.GetFrame(1);MethodBasemethodBase=stackFrame.GetMethod();object[]attributes=methodB

c# - 接口(interface)上的属性

我有一个接口(interface),它定义了一些带有属性的方法。这些属性需要从调用方法中访问,但我拥有的方法不会从接口(interface)中提取属性。我错过了什么?publicclassSomeClass:ISomeInterface{MyAttributeGetAttribute(){StackTracestackTrace=newStackTrace();StackFramestackFrame=stackTrace.GetFrame(1);MethodBasemethodBase=stackFrame.GetMethod();object[]attributes=methodB
12