IceAzul Posted May 18, 2006 Posted May 18, 2006 (1) How do you create the information for intellisense? (The description of variables, classes) (2) How can you generate an error when an item is added to a custom built collection class (from an array) during a foreach loop? Thank You Quote
Administrators PlausiblyDamp Posted May 18, 2006 Administrators Posted May 18, 2006 If you are using C# and provide xml comments (comments that begin with a ///) then the intellisense will be generated from them - this also works in VB if you are using VS 2005. If they are adding an item you could simple throw an exception when they attempt to add an invalid item. Or are you asking something different? Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
IceAzul Posted May 18, 2006 Author Posted May 18, 2006 When I make a custom collection type class (due to the fact that I needed better control over the array then inheriting from an arraylist) and create an IEnumerator class, I want an error to be thrown when an object is added while in that foreach loop, like it does by an arraylist. How can I accomplish this? Quote
mskeel Posted May 18, 2006 Posted May 18, 2006 Also, if you are using Visual Basic in VS 2003, there are some VS add-ins and external tools that you can use to create the XML document used for intellisense. Also, another thread on the same subject. Quote
Leaders snarfblam Posted May 20, 2006 Leaders Posted May 20, 2006 You could have your collection object track any open enumerators and throw an exception when something is added or removed while there are open enumerators. You could also have the collection object raise an event when something is added/removed and have your enumerators handle the event. Quote [sIGPIC]e[/sIGPIC]
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.