473,791 Members | 3,097 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

remove unused subs/func and code automaticly

Hi,

There use to be some 3rd party tools that would remove unused subs and
function and unused code from vb projects.

Is there are a way to do this in vb.net 03
Nov 20 '05 #1
2 4014
For the life of me I don't understand why VB.NET lets you even have such
stuff in your code. In C#, if code isn't used, you get compiler warnings.
Anyway, if there's a way to do it by default in VB.NET, I don't know how but
would love to see how.

Here's a tool that can do it for you though...
http://www.aivosto.com/project/project.html
"AussieRule s" <so*****@nowher e.com> wrote in message
news:uJ******** ******@tk2msftn gp13.phx.gbl...
Hi,

There use to be some 3rd party tools that would remove unused subs and
function and unused code from vb projects.

Is there are a way to do this in vb.net 03

Nov 20 '05 #2
* "William Ryan" <do********@nos pam.comcast.net > scripsit:
For the life of me I don't understand why VB.NET lets you even have such
stuff in your code.


Why not? Maybe the code will be used in a future release. What does
"unused" mean? Maybe somebody wants to call these procedures using
reflection. But you are right, a warning (or "informatio n") would be nice.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #3

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

Similar topics

8
2295
by: | last post by:
In global.asa I have some code outside all the Subs. I have some confirmation that it is being executed OnStart. Yet I can's see if it is executed OnEnd. The literature I have says that OnEnd the Sub Application_OnEnd is executed, but is does not say that anything else is executed Actually I even can't understand if global.asa is permited to have any code outside the Subs
13
2101
by: Steven Scaife | last post by:
I have decided to re-write the intranet site i created over a year ago. The coding is pretty awful and hard to read cos I made the mistake of not putting comments in or putting crappy comments in with the code. So I have decided to try and make things neater by grouping it into subs. So i have a sub to create the variables, a sub for the connection etc. Only problem is when i call my subs, it says that the variable is undefined. If i...
0
2782
by: Kaare Rasmussen | last post by:
I'm looking for an easy way to find unused modules in a perl program. I can do it by hand, but it's slow, error prone and boring. The task is not made easier by the fact that some modules are exporting subs and hashes and that the coding style in general best can be described as 'varied'. I could, to my surprise, not find any solution on CPAN.
3
3070
by: Apollo440 | last post by:
How to remove unused using directive? eg) using System; using System.Windows.Forms; <- i want to remove this unused using directive namespace foo { :
11
1886
by: Nicky Smith | last post by:
Hello, I'm studying a book on VB.net Win apps, and I'm reading a section on events and delegates and raising events. Is it just me, or is this not just subs dressed up as something else? I mean, for one, delegates point to subs, so when you call a delegate, why not just call the sub dierectly and not bother adding the extra code involved adding the delegate?
5
3151
by: Brett | last post by:
In a class, I have several Private subs. I declare an instance of the class such as: Dim MySelf as new Class1 within a private sub. The motive is to provide access to other subs within the same class. Is this correct? It would be nice to declare the MySelf instance in the Class public space (just under Private Class Class1). That will give this error: Cannot refer to an instance member of a class from within a shared
3
7190
by: Tom McL. | last post by:
Is there a way I identify and remove unused variable within vb2005 standard edition
12
9626
by: zacks | last post by:
Suddenly, in a VB2005 project I am working on, several variables show up in the list of warnings are being unused local variables. But they all are. Several of them are the ex variable used in a Try/Catch, and the Catch for each one references the ex exception variable. Yet it is still flagged as unused? What gives?
31
8624
by: smachin1000 | last post by:
Hi All, Does anyone know of a tool that can automatically analyze C source to remove unused #includes? Thanks, Sean
0
9669
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9515
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10427
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10155
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9995
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7537
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
4110
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 we have to send another system
2
3718
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2916
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.