wyrd Posted February 1, 2003 Posted February 1, 2003 Okay.. heh.. I've been programming like this for 5 years; if (something) { stuff.. } Notice where the { } are? .NET auto formats it to.. if (something) { stuff.. } I've always hated that because it just.. I don't know.. I hate looking at lines with a single { on it. Just, argh 'n stuff. Is there ANY way to make the .NET IDE not format my darn { }? Heh. While I'm at it, I heard about a new .NET update coming out soon and part of it will boost the intellisense in C#. Does that include adding events available to the drop downs? One huge difference I've noticed is that in VB.NET you can sift through all of the events available for the selected object (talking about the code window here, the two drop downs at the top) and it'll write in the code for you when you select the event. Either I'm missing something, or C# just doesn't allow that and you need to add delegates to the events yourself and point it to whatever function you want to handle the event. On an oddball note, however, it does auto code the Click events for you. :confused: Not really an annoyance thing (I'm used to coding out events in Java), but more or less just curious. :) Quote Gamer extraordinaire. Programmer wannabe.
*Experts* Volte Posted February 1, 2003 *Experts* Posted February 1, 2003 You can change the auto-formatting in the IDE options. Text Editor -> C# -> Formatting -> Leave open braces on same line as construct. To add events click the control, and in the property window, click the lightning bolt to change the properties to a list of events. Then type the name of the delegate sub into one of the Events and press enter. That wires the event up for yoo. Quote
wyrd Posted February 1, 2003 Author Posted February 1, 2003 You can change the auto-formatting in the IDE options. Text Editor -> C# -> Formatting -> Leave open braces on same line as construct. Aha! Now we're talk'n. :cool: To add events click the control, and in the property window, click the lightning bolt to change the properties to a list of events. Then type the name of the delegate sub into one of the Events and press enter. That wires the event up for yoo. .... I knew that. :rolleyes: Anything else them people at MS decided to alter when using C# compared to VB? Concerning the IDE that is, not the language itself heh. BTW, thanks. :) Quote Gamer extraordinaire. Programmer wannabe.
Moderators Robby Posted February 2, 2003 Moderators Posted February 2, 2003 Wyrd, I do the same thing, although I didn't change it in the options, I still fixed each line after the autoformat was done and they stayed in place. Quote Visit...Bassic Software
*Gurus* divil Posted February 2, 2003 *Gurus* Posted February 2, 2003 That lack of being able to create event definitions easily in C# is kinda annoying. I know you use the property browser to do it for controls, but what about other objects you have declared in code? Yes, the next release of Visual Studio addresses this. As far as I know it doesn't have those combo box things to do it, but if you start typing a line like this: myobject.myevent += It will pop up an intellisense thing saying "press tab to finish line and create procedure" and it will write the necessary code and take you to the procedure it creates. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
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.