Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Selected Reading
What are punctuators in C#?
Punctuators are used in C# as special symbols to a group or divide the code. It includes −
] () {}, ; * = #
For example, = gets included in a class or even while declaring a variable. Statement ends with a semi-colon −
int a = 10;
In a class, the braces are used −
class Demo {
}
While declaring a dictionary −
var d = new Dictionary<string, int>(5);
It is also used while declaring and initializing a list −
List<string> myList = new List<string>() {
"mammals",
"reptiles",
"amphibians"
}; Advertisements
