Пример #1
0
 public Type GetType()
 {
     // let's suppose that this is equivalent to the current implementation of Object.GetType
     return(ClrInternals.GetType(this));
 }
Пример #2
0
 // this one is perhaps a little goofy, since it doesn't satisfy any interface
 // In order to be equivalent to the current Object.MemberwiseClone implementation, I've made this protected,
 // but we cannot have a protected method that implements an interface, so this throws a wrench into things.
 protected MyClassExampleA MemberwiseClone()
 {
     // let's suppose that this is equivalent ot the current implementation of Object.MemberwiseClone
     return((MyClassExampleA)ClrInternals.MemberwiseClone(this));
 }
Пример #3
0
 // The compiler also implicitly makes all classes implement the interfaces with the following code (unless otherwise specified)
 #region IEquatable Members
 public bool Equals(IEquatable other)
 {
     // let's suppose that this is equivalent to the current implementation of Object.Equals
     return(ClrInternals.Equals(this, other));
 }