Solved

! in front of a boolean variable

Posted on 2006-06-13
3
235 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 20 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 20 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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

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…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

717 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