473,487 Members | 2,461 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Tidy up blank methods

Good morning is there a method using the C# ide to 'clean up' all
methods which have nothing inside them. EG sometimes I make an event
which later I clear out - the project is full of them.
Normally, you can go to properties, events, right click and 'reset' but
that is not what I am looking for. Thanks.
Sep 24 '07 #1
6 1308
Alistair,

Not that I know of. There might be some third party components which
will do this, but I am not aware of any.

You could create a plug in for VS.NET which will examine the method
bodies (the IDE interface has methods to allow you to inspect this) and then
delete them.

You could also look at the compiled assembly and then check for an IL
signature which corresponds to an empy method (reflection would help you
with that). Of course, the caveat here is that you need a compiled
assembly, which you might not be able to obtain (due to compilation errors
in your project which you are working on in the IDE).
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Alistair George" <no****@xtra.co.nzwrote in message
news:46********@news.orcon.net.nz...
Good morning is there a method using the C# ide to 'clean up' all methods
which have nothing inside them. EG sometimes I make an event which later I
clear out - the project is full of them.
Normally, you can go to properties, events, right click and 'reset' but
that is not what I am looking for. Thanks.

Sep 24 '07 #2
Hi,

"Alistair George" <no****@xtra.co.nzwrote in message
news:46********@news.orcon.net.nz...
Good morning is there a method using the C# ide to 'clean up' all methods
which have nothing inside them. EG sometimes I make an event which later I
clear out - the project is full of them.
Normally, you can go to properties, events, right click and 'reset' but
that is not what I am looking for. Thanks.
Not that I know of. Really sometimes I do the same but they are not that
many as to require a tool to get rid of them.
Sep 24 '07 #3
Ignacio Machin ( .NET/ C# MVP ) wrote:
Hi,

"Alistair George" <no****@xtra.co.nzwrote in message
news:46********@news.orcon.net.nz...
>Good morning is there a method using the C# ide to 'clean up' all methods
which have nothing inside them. EG sometimes I make an event which later I
clear out - the project is full of them.
Normally, you can go to properties, events, right click and 'reset' but
that is not what I am looking for. Thanks.

Not that I know of. Really sometimes I do the same but they are not that
many as to require a tool to get rid of them.

Thanks for info. I'm quite new to C# and some things I like, but some
other things I dont. EG there are many long winded processes which are
just not necessary in other ide such as menu items; C# you have to right
click then properties, events to define an event for that menu item. In
other IDE you just double click the item, and it starts a new event
ready for your code. Lots of expeditious things like that which you
would think that MS would have sorted by 2007.
Al.
Sep 24 '07 #4
Hi,

"Alistair George" <no****@xtra.co.nzwrote in message
news:46********@news.orcon.net.nz...
Ignacio Machin ( .NET/ C# MVP ) wrote:
>Hi,

"Alistair George" <no****@xtra.co.nzwrote in message
news:46********@news.orcon.net.nz...
>>Good morning is there a method using the C# ide to 'clean up' all
methods which have nothing inside them. EG sometimes I make an event
which later I clear out - the project is full of them.
Normally, you can go to properties, events, right click and 'reset' but
that is not what I am looking for. Thanks.

Not that I know of. Really sometimes I do the same but they are not that
many as to require a tool to get rid of them.
Thanks for info. I'm quite new to C# and some things I like, but some
other things I dont. EG there are many long winded processes which are
just not necessary in other ide such as menu items;
I did not understand what you said, could you explain further?

C# you have to right
click then properties, events to define an event for that menu item. In
other IDE you just double click the item, and it starts a new event ready
for your code. Lots of expeditious things like that which you would think
that MS would have sorted by 2007.
Al.
VS does the same, each control has a default event, if you double click it
in the designer you will get a stub ready.

I think that you need to explore further the IDE.
Sep 24 '07 #5

"Ignacio Machin ( .NET/ C# MVP )" <machin TA laceupsolutions.comwrote in
message news:%2****************@TK2MSFTNGP02.phx.gbl...
Hi,

"Alistair George" <no****@xtra.co.nzwrote in message
news:46********@news.orcon.net.nz...
>Ignacio Machin ( .NET/ C# MVP ) wrote:
>>Hi,

"Alistair George" <no****@xtra.co.nzwrote in message
news:46********@news.orcon.net.nz...
Good morning is there a method using the C# ide to 'clean up' all
methods which have nothing inside them. EG sometimes I make an event
which later I clear out - the project is full of them.
Normally, you can go to properties, events, right click and 'reset' but
that is not what I am looking for. Thanks.

Not that I know of. Really sometimes I do the same but they are not that
many as to require a tool to get rid of them.
Thanks for info. I'm quite new to C# and some things I like, but some
other things I dont. EG there are many long winded processes which are
just not necessary in other ide such as menu items;

I did not understand what you said, could you explain further?

C# you have to right
>click then properties, events to define an event for that menu item. In
other IDE you just double click the item, and it starts a new event ready
for your code. Lots of expeditious things like that which you would think
that MS would have sorted by 2007.
Al.

VS does the same, each control has a default event, if you double click it
in the designer you will get a stub ready.

I think that you need to explore further the IDE.
Also in the properties editor, it has its own toolbar where you can select
between properties and events. If you list the events, then you can
immediately create the handler for any event, not just the default one.

Looking again I think this is what you already know about. So why not leave
the event list open, which saves you the right click+properties?
Sep 24 '07 #6
C# you have to right
>click then properties, events to define an event for that menu item. In
other IDE you just double click the item, and it starts a new event ready
for your code. Lots of expeditious things like that which you would think
that MS would have sorted by 2007.
Al.

VS does the same, each control has a default event, if you double click it
in the designer you will get a stub ready.

I think that you need to explore further the IDE.

Most likely sometimes it works but yesterday it was not doing it for me
hence the above comments.
Today it is working so perhaps my IDE is playing up. I have spoken to
another who has same C# as me, and his crashes (C# aborts) when we try
to cut a menu item so thats an issue that we have to put up with.
Sep 24 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1785
by: compu_global_hyper_mega_net_2 | last post by:
Greetings, usenet's obviously dying. Where's everyone hanging out? One of the yahoo groups or something? anyway. Hopefully someone picks this up: I'm trying to compile php-5.0.0RC2 with...
1
2124
by: Mike Gifford | last post by:
Hello Folks, I'm trying to get tidy set up on a pretty standard fedora core 1 server. Looks pretty simple from here: http://ca3.php.net/manual/en/ref.tidy.php Should just have to go: pear -v...
0
3310
by: Börni | last post by:
Hello, I am using tidy to clean up an xml file, but my problem is that it replaces newlines with normal whitespaces. Still worse is that if i retrieve text from the xml file it contains all...
12
17074
by: Stefan Weiss | last post by:
Hi. (this is somewhat similar to yesterday's thread about empty links) I noticed that Tidy issues warnings whenever it encounters empty tags, and strips those tags if cleanup was requested....
0
1825
by: Christoph Schneegans | last post by:
Hi! I'd like to present an easy, yet powerful approach to use the HTML Tidy program from <http://tidy.sourceforge.net/> in ASP.NET. It is similiar to...
40
5534
by: VK | last post by:
Hi, After the response on my request from W3C I'm still unclear about Tidy vs. Validator discrepansies. That started with <IFRAME> issue, but there is more as I know. Anyway, this very basic...
0
1860
by: BG Mahesh | last post by:
hi I have installed Tidy on Fedore Core 4.0 using RPM. I have a very simple script that uses tidy, ------------tidy.php------------------ <html>a html document</html> <? $html =...
1
20193
by: Martin Odhelius | last post by:
Hello, Does anybody here have any example code for Tidy.Net (http://sourceforge.net/projects/tidynet/) ? I can't find one single example. I try to convert a html-string to well formed xhtml,...
0
5021
by: kempshall | last post by:
Can somebody please tell me how to install the Tidy module for PHP 5 on a Mac? I tried what the php.net website said, which is running the command "pecl install tidy" but the installation failed...
0
7108
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6967
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7142
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7352
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4565
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3078
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3071
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1383
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
272
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.