Results 1 to 3 of 3

Thread: Method naming

  1. #1

    Thread Starter
    Frenzied Member vbgladiator's Avatar
    Join Date
    May 2001
    Posts
    1,950

    Method naming

    Hey,

    I have a class that is inheriting from DictionaryBase.

    I have the following 2 methods in the class

    VB Code:
    1. Friend Overloads Sub Remove(ByVal item As Schedule)
    2.         MyBase.Dictionary.Remove(item.ID)
    3.     End Sub
    4.     Friend Overloads Sub Remove(ByVal ID As Integer)
    5.         MyBase.Dictionary.Remove(ID)
    6.     End Sub

    However when I run the code, it never calls these 2 methods. If I try to go to the definition from the line of code that is calling the remove method, it brings up the object browser.

    Can I not name my methods Remove?

    Thanks,
    Don't anthropomorphize computers -- they hate it

  2. #2
    Fanatic Member Mr.No's Avatar
    Join Date
    Sep 2002
    Location
    Mauritius
    Posts
    651

    Re: Method naming

    I think your methods should be Public instead of Friend
    Using VB.NET 2003/.NET 1.1/C# 2.0
    http://del.icio.us/rajoo
    Blow your mind, smoke gunpowder
    Ashes to ashes, dust to dust
    If God won't have you, the devil will. - Author unknown
    Don't follow me, I'm lost too ...

  3. #3

    Thread Starter
    Frenzied Member vbgladiator's Avatar
    Join Date
    May 2001
    Posts
    1,950

    Re: Method naming

    Yes, I figured that out as well.

    Thanks.
    Don't anthropomorphize computers -- they hate it

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width