Monday, July 11, 2011

bool Vs Boolean in C#

bool is c# keyword where Boolean is not, but they represent same type.

We have the same thing for string/String, float/Single, int/Int32 and
other primitive types.


The difference is that bool, being a keyword, works in all contexts. To use Boolean you have to import the System
namespace

No comments:

Post a Comment

If you’re using Visual Studio to build your .NET MAUI app on a Mac, locating the IPA (iOS App Package) file can be a bit tricky

  If you’re using   Visual Studio   to build your   .NET MAUI   app on a   Mac , locating the   IPA (iOS App Package)   file can be a bit tr...