Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 VA adds () on a delegate in C#
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

brian_winfield
Senior Member

USA
33 Posts

Posted - Feb 27 2004 :  4:59:23 PM  Show Profile

When you create a new delegate VA thinks the delegate is a function call so it adds (). For Example:

VA will complete OnEvent with ()
item.SomeEvent += new EventHandler(this.OnEvent());

instead of
item.SomeEvent += new EventHandler(this.OnEvent);






Brian S Winfield

Uniwares
Tomato Guru

Portugal
2321 Posts

Posted - Feb 27 2004 :  5:14:53 PM  Show Profile
It does the same for function references in C/C++. I suppose its pretty hard to determine what the programmer intends to put there.
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Feb 27 2004 :  6:15:39 PM  Show Profile
VA X does not compare what you write with expected types in an argument list. You can type jibberish if you like.

When VA X completes or repairs case of OnEvent, it adds () regardless of context. Press UNDO to get rid of the parentheses.

Whole Tomato Software, Inc.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000