The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

MickeyP (23) [Avatar] Offline
#1
At the bottom of p262, you've talked about creating an extension method with same signature as an existing static method of the extended type. e.g extension method for IsNullOrEmpty on the string extended type.

Tried it, and it works fine, but worth knowing that VS Intellisence gets slightly thrown when displaying the available methods dropdown listbox and it displays the existing static method (old signature and icon) instead of the newly created extension method. So unless you created the extension method yourself, it could cause confusion as you may (incorrectly) think its an instance method, and also the old signature doesn't make sence either when applied to a variable of the type.

Guess this is a VS foible that someone should tell them about.
jon.skeet (483) [Avatar] Offline
#2
Re: 10.2.4 p 262 intellisence can get itself tied in knots
Interesting. Will try it for myself and capture a screenshot, then create an issue on connect.microsoft.com as well as writing a note about it.
mgravell (64) [Avatar] Offline
#3
Re: 10.2.4 p 262 intellisence can get itself tied in knots
I can reproduce; let me know if you want a screen.
jon.skeet (483) [Avatar] Offline
#4
Re: 10.2.4 p 262 intellisence can get itself tied in knots
Added a new note here: http://csharpindepth.com/ViewNote.aspx?NoteID=148

(Thanks for the screenshot Marc, but I thought in the end it would be worth creating one which used the specific example already in the book.)