Click here to Skip to main content
15,887,821 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
Is there a difference when I dimension a variable as system.boolean or just as boolean?
Posted
Comments
Vishal Pand3y 9-Jun-15 11:35am    
is it bool vs Boolean ? because system.boolean and boolean is same
[no name] 9-Jun-15 11:36am    
Probably going to depend a lot on what programming language "boolean" is. If by System.Boolean you mean some .NET language then you would have found your answer if you had just read the documentation.

1 solution

bool is a compiler alias of System.Boolean, int is System.Int32 etc, so when you type just "bool", it is converted to "System.Boolean".

https://msdn.microsoft.com/en-us/library/ya5y69ds(VS.80).aspx[^]

Also I found the answer to your question in seconds by googling "bool vs system.boolean", read the FAQ and please do your own basic research before asking a question.
 
Share this answer
 
v2
Comments
Richard Deeming 9-Jun-15 11:53am    
Given the text "dimension a variable" and "as boolean", I suspect the OP is using VB.NET, not C#. :)
Sergey Alexandrovich Kryukov 9-Jun-15 12:01pm    
5ed.
—SA
Member 11742116 9-Jun-15 13:13pm    
Richard is correct, I'm working in VB.net, and I did do basic research but couldn't find an answer which is why I came here, no need to jump to assumptions. There is no "bool" but rather "Boolean" (I get that they're the same word but that's not the point...) which is perhaps why your search yielded a helpful answer and mine haven't been. F-ES answered my question with the first line; I simply wanted to know if the compiler read them in in any minutely different way. Thank you for your answers

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900