Feb
19
Written by:
Peter Henry
Thursday, February 19, 2009 10:12 PM
With C# growing up from it's C/C++ roots, it seems natural for it to have semicolons. And there's also all the brackets, parenthesis, and braces! But do you know the technical differences between them? I'm always forgetting, so here's my permenant reminder for myself (as long as my server stays turned on that is :>).
|
?
|
Term
|
AKA
|
Uses
|
( xyz )
|
Parenthesis
|
|
- method calls (outgoing or incoming) to pass parameters
- order of precedence
|
[ xyz ]
|
Brackets
|
Box Brackets or Square Brackets
|
- arrays
- attributes (.NET languages)
|
{ xyz }
|
Braces
|
Curley Brackets
|
- code blocks
- scope delimiters
- composite structures
|
< xyz >
|
Chevrons
|
Angle Brackets, Diamond Brackets
|
- html tag delimiters
- generic class argument delimiters
|
References
Wikipedia: Bracket
Copyright ©2009 Peter Henry
Tags: