我沒有什麼特別要實現,但我想了解更多關於類擴展。 這是類擴展直接從apple Categories and extensions的解釋: @interface MyClass : NSObject
@property (retain, readonly) float value;
@end
// Private extension, typically hidden in the main
在我們的應用中,我們有我們有一些枚舉和一些Func鍵 [Flags]
public enum MyEnum
{
zero= 0,
two = 2,
three = 3,
threetwo = two | three
}
public void SomeFunc()
{
var ThreeTwo = Myenum.threetwo;