Results 1 to 8 of 8

Thread: Which of the following are true about Extension methods?

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2010
    Posts
    6

    Which of the following are true about Extension methods?

    Actually I m new in Vb.net .. Just Need to Clear easy Question

    1) They must be declared static
    2) They can be declared either static or instance members
    3) they must be declares in the same assembly(but may be in different sources files)
    4) Extension methods can be used to override existing instance methods
    5) Extension methods with the same signature for the same class may be declared in multiple namespace without causing compilation errors

    More than one can be correct?

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,297

    Re: Which of the following are true about Extension methods?

    I would question why you need those obviously formal questions answered here. Either it's homework, in which case it's cheating for us to answer them for you, or else it's a self-test from a book or tutorial of some sort, in which case you should have read the information in the preceding section. Either way, I think that it's more appropriate for you to tell us what you think first, rather than us just giving you the answers to something that's obviously designed to test your knowledge, not ours.

  3. #3

    Thread Starter
    New Member
    Join Date
    Mar 2010
    Posts
    6

    Re: Which of the following are true about Extension methods?

    What i Guess... its B.
    B) They Can be declared either static or instance members

    I just need to remove Confusion.
    So Ask For Genius's Helps

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,297

    Re: Which of the following are true about Extension methods?

    Where exactly are those questions from? The terminology looks like it relates to C# more than VB.

  5. #5

    Thread Starter
    New Member
    Join Date
    Mar 2010
    Posts
    6

    Re: Which of the following are true about Extension methods?

    these are basically some interview questions.. Which i need to answer
    But Dont know what is right Answer..
    So kindly let me know the Exact Choice

  6. #6
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,297

    Re: Which of the following are true about Extension methods?

    Do you know what an extension method is? Do you know what static and instance methods are?

  7. #7

    Thread Starter
    New Member
    Join Date
    Mar 2010
    Posts
    6

    Re: Which of the following are true about Extension methods?

    Dont know sir thats why asking here....
    Can u please tell me the answer instead of asking counter Questions

    Your help will be highly appreciated
    Thanks

  8. #8
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,297

    Re: Which of the following are true about Extension methods?

    What's the point of our giving you the answer to that question when you don't know what the question means and you don't know what the answers mean? If that truly is an interview question then I'm not really interested in providing you with a fact that you can regurgitate without any understanding. I wouldn't want to hire someone like that. I would want to hire someone who either knew what they were talking about or at least wanted to learn. If that's you then I suggest that you do some reading on extension methods and then post back if you need clarification on anything. If you're not interested in learning but just want to know what to say at an interview, that's your prerogative but I'm afraid you'll have to wait for someone else to supply the script.

    If you do want to learn, you could start here:

    http://social.msdn.microsoft.com/Sea...20methods&ac=3

    I'm quite sure that there's plenty of other information available on the web too.

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