?
Solved

! in front of a boolean variable

Posted on 2006-06-13
3
Medium Priority
?
236 Views
Last Modified: 2010-04-16
Hi Guys,
            What does "!" mean in front of a boolean variable,
eg.

       if (!method.IsPublic)
            {
                return false;
            }


Thank you,
Serge
0
Comment
Question by:Autofreak
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 33

Expert Comment

by:hongjun
ID: 16895310
It is to negate it
0
 
LVL 33

Accepted Solution

by:
hongjun earned 80 total points
ID: 16895317
That's

if method.IsPublic is true, then !method.IsPublic will give you false and vice versa
0
 
LVL 35

Assisted Solution

by:mrichmon
mrichmon earned 80 total points
ID: 16895695
Note this does not just apply to boolean variables.  ! means not.  So therefore when you see != it means not equal.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question