In this short article I will clear a common doubt faced by developers i.e. what is the difference between bool and Boolean data type in C# .Net.
Now the question arises:
1. What is the difference between bool and Boolean?
2. Which one to use and when?
So the answer is both are one and the same and both can be used. But it is recommended to use the bool as that is the alias for the class System.Boolean.
In other words the Boolean represents the System.Boolean class while bool is the keyword for the System.Boolean that we can use to create Boolean objects.
Here’s the MSDN reference for the different keywords for different classes Built-In Types Table
Difference between bool and Boolean in C# .Net