MyClass Keyword

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sonia.sardana
    New Member
    • Jul 2006
    • 95

    #1

    MyClass Keyword

    Give the exact definition of MyClass keyword?
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    Easy. MyClass is NOT a keyword.
    Done. What else?

    Comment

    • moorcroft
      New Member
      • Mar 2008
      • 57

      #3
      The MyClass keyword is used to refer to the containing class and its inherited members. It refers to the current instance of a class as originally implemented. It treats all method calls as NotOverridable, i.e., called methods are not affected by overriding in a derived class. The MyClass keyword can be used as a qualifier for Shared members. Following are some restrictions imposed on the usage of the MyClass keyword:
      It cannot be assigned to a variable.
      It cannot be passed to procedures.
      It cannot be used with the Is operator for logical comparison.
      It cannot be used in standard modules.

      Comment

      • sonia.sardana
        New Member
        • Jul 2006
        • 95

        #4
        Platter , MyClass is a keyword..Its Sure....But I do Not Know the exact defintion.

        http://msdn2.microsoft.com/en-us/lib...yk(VS.71).aspx

        Comment

        • Plater
          Recognized Expert Expert
          • Apr 2007
          • 7872

          #5
          It occured to me that it was some nonsensical VB-only thing.
          But I stuck to my guns on that one.


          EDIT: That article makes it sound like the base operator. Used to refer to a base class's methods from withen an inherited class.

          Comment

          • kenobewan
            Recognized Expert Specialist
            • Dec 2006
            • 4871

            #6
            Originally posted by Plater
            It occured to me that it was some nonsensical VB-only thing.
            Ouch, that hurt ;). I searched for some witty but stinging C# reply, but came up short. All I have is Hannes Preishuber and save the C# conferences lol.

            ps - who is Platter? Is it Bruno, the Grand master of the Teutonic Order - http://en.wikipedia.org/wiki/Platter?

            Comment

            Working...