Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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. :)

Gamer extraordinaire. Programmer wannabe.
  • *Experts*
Posted

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.

Posted
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. :)

Gamer extraordinaire. Programmer wannabe.
  • *Gurus*
Posted

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.

MVP, Visual Developer - .NET

 

Now you see why evil will always triumph - because good is dumb.

 

My free .NET Windows Forms Controls and Articles

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...