473,499 Members | 1,539 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to check if variable is used?

Hi,

How can I check, automatically, if a variable declared in a function is used
in that function? I have looked at FXCop, but didn't find a solution.
Greetings,

Dieter
Nov 20 '05 #1
2 1040
No idea except to say that the C# background compilier seems to do this
automatically.
I'm surprised FxCop doesn't pick up this.

Richard

"dieter" <di************@advalvas.be> wrote in message
news:62*************************@posting.google.co m...
Hi,

How can I check, automatically, if a variable declared in a function is used in that function? I have looked at FXCop, but didn't find a solution.
Greetings,

Dieter

Nov 20 '05 #2
I guess you can create a class with a member that would be this variable
instead and then Read it as a Property. and in that Property Get Sub you can
also set another property (IsVariable1Used) as True or something

Or is that to much of an overkill?

/lars
"dieter" <di************@advalvas.be> skrev i meddelandet
news:62*************************@posting.google.co m...
Hi,

How can I check, automatically, if a variable declared in a function is used in that function? I have looked at FXCop, but didn't find a solution.
Greetings,

Dieter

Nov 20 '05 #3

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

Similar topics

20
10080
by: | last post by:
If I need to check if a certain value does exist in a field, and return either "yes" or "not" which query would be the most effestive?
15
2095
by: tabonni | last post by:
I want to check each button groups and save the checked value into a 2 dimensional array. But, it doesn't work. Could anyone tell me what's wrong with my code. My code is as follow: <html>...
26
9563
by: JGH | last post by:
How can I check if a key is defined in an associative array? var users = new array(); users = "Joe Blow"; users = "John Doe"; users = "Jane Doe"; function isUser (userID) { if (?????)
3
1571
by: opt_inf_env | last post by:
Hello, In some examples of a PHP implementation I saw the following: if ( isset(x) and x==12) I do not understand what for before to check whether some variable has some value one need to check...
3
1500
by: Oliver Saunders | last post by:
is there anyway to check if a string could be used a variable name. So return false if the first character isn't a letter or if it contains spaces etc. I started writing a function that would do...
4
10249
by: Laphan | last post by:
Hi all In my functions I'm using a double-check all the time to trap if a value has nothing in it and my question is do I need this double-check. My check line is: IF IsNull(xxx) OR...
7
3977
by: VB Programmer | last post by:
How do I create a submenu so that I can only check ONE of the values? Example: Menu --> Color SubMenu --> Red Value 1 --> Yellow Value 2 --> Green Value 3 Thanks....
8
10149
by: Antony | last post by:
compiler£ºVisual Studio.Net 2003 (VC7.1) compile type£ºDebug problem: wanted more information about the "Run-Time Check Failure #n",thanks! Example1: #include "stdafx.h" void malice() {...
3
6291
by: ferg | last post by:
I have a Customer table. The table has two different CHECK constraints. Then there is the Customer details dialog, which provides the user with an UI for changing users. I have some UPDATE sql,...
0
7007
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
7171
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
7220
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7386
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
5468
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4599
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
3098
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
1427
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
295
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.