Quantcast
Channel: C# – The Code Hubs
Viewing all articles
Browse latest Browse all 10

Difference between bool and Boolean in C# .Net

$
0
0

I’ll answer a frequently asked question about the distinction between the bool and Boolean data types in C#.Net in this little essay.

The following question now arises:

1. What distinguishes bool from Boolean?
2. When should I utilise each one?

The response is that both are the same and that they can both be used. However, since bool is an alias for the class System, it is advised to use it instead.Boolean.
In other words, the System is represented by the Boolean.Boolean class, whereas “System” is the keyword.We can utilise this boolean to make boolean objects.
The MSDN reference for the various keywords for various classes is provided here. Integrated Types Table

The post Difference between bool and Boolean in C# .Net appeared first on The Code Hubs.


Viewing all articles
Browse latest Browse all 10

Trending Articles