Solved

How do you define a variable as a bit or True in C#?

Posted on 2008-09-29
4
190 Views
Last Modified: 2010-04-21
I need to define a variable as true but I am unsure what/how to assign the variable.  Here is how I am trying to do it now but obviously it is not right.  Can someone point me in the right direction?

bit CoveredLoad = true;

0
Comment
Question by:kwh3856
4 Comments
 
LVL 16

Accepted Solution

by:
CuteBug earned 250 total points
Comment Utility
use bool

bool CoveredLoad = true;
0
 
LVL 26

Assisted Solution

by:Anurag Thakur
Anurag Thakur earned 250 total points
Comment Utility
bool CoveredLoad = true;
0
 

Author Closing Comment

by:kwh3856
Comment Utility
Thanks for the quick response.

Thanks
Kenny
0
 
LVL 3

Expert Comment

by:R_Janssen
Comment Utility
try Boolean (or bool for short).
example:
bool IsThisTrue = true;
 
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video discusses moving either the default database or any database to a new volume.

744 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now