+ 1

What is different between bool and Boolean in C#

16th Dec 2016, 6:02 AM
Mahmood Ali
Mahmood Ali - avatar
3 Respostas
+ 2
thank you ..^^
16th Dec 2016, 2:33 PM
Mahmood Ali
Mahmood Ali - avatar
+ 1
Bool is just an alias of Boolean. instead of using System.Boolean we can use Bool. see the below example. bool x = true; System.Boolean y = false; Console.WriteLine("Value of x : " + x); Console.WriteLine("Value of y : " + y); This is for other data type also for example string, int32, double, etc...
16th Dec 2016, 2:28 PM
Siddharth Warwatkar
Siddharth Warwatkar - avatar
+ 1
No difference in action. bool is a keyword in every C-like programming language, Boolean is .NET's representation of bool as a structure and not a keyword.
16th Dec 2016, 2:31 PM
Sara Majidzadeh
Sara Majidzadeh - avatar