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

LIveCharts2: Charts for Windows and web

Charts for Windows and web including .Net MAUI  LiveCharts - LiveCharts2 (lvcharts.com)