Possible Duplicate:
What is the difference between Bool and Boolean types in C#
I’m doing a lot of C# programming for a web application these days. My team haven’t made a decision on whether we should use base types or complex types.
What is the advantages of the different types?
Feks:
Object vs object
Boolean vs bool
and so on…
Thanks!
There is no difference –
boolis an alias forBoolean,objectis an alias forObject. However, idiomatic C# would have you useobject,bool,int, etc.Note that, by default, StyleCop will enforce this practice. The relevant rule is SA1121.
There are, of course, different opinions about whether the rule is valid. I would suggest reading this SO question: C# – StyleCop – SA1121: UseBuiltInTypeAlias – Readability Rules.