I have started reading C # language specialty that comes with Visual Studio: In chapter An event is a member who enables to provide notifications to a class or object, an event is declared as a field, except that an event keyword in the announcement is evening And type should be a representative type. Within a class, declaring an event member, this event behaves like a representative field type (provided that the event is not inconclusive and the accessories do not declare). The field stores the reference of the representative that represents event handlers which have been added to the event. If no event handles are present, the field is empty. The event handler is connected using the + = operator and the following example has been removed using the operator: When I came to know about the Error CS1061: 'System.Collections.Generic.List There is no definition for 'change' in and any extension method The first argument of the 'changed' type 'System.Collections.Generic.List' type can not be accepted (are you using an instruction or assembly reference?) Am I missing something here? I used the ILSP to see the definition of the class and I do not see the This is not related to the C: \ Program Files (x86) \ Microsoft Visual Studio 11.0 \ VC # \ Specification \ 1033
1.6.7.4 events I found the following:
List & lt; T & gt;
list & lt; String & gt; .
Adds a changed event to use the system; Class test {stable fit change; Fixed zero list changed (object sender, EventArgs e) {changeCount ++; } Fixed Zero Main () {List & lt; String & gt; Name = new list & lt; String & gt; (); Name. Changed + = new event handler (changing list); Names.Add ("Liz"); Names.Add ("Martha"); Names.Add ("Beth"); Console.WriteLine (changeCount); // Output "3"}} For advanced scenarios where the underlying storage of an event is controlled, an event announcement can clearly add and remove the addressers, Excerpts set of assets are somewhat similar.
list.Changed event, I was surprised, so I created a new console application in Visual Studio 2012 < P> When I tried to compile the application (using both the Visual Studio and Developer Command Prompt) I got the following error:
changed event.
list
No comments:
Post a Comment