Home >Backend Development >C#.Net Tutorial >What are punctuation marks in C#?

What are punctuation marks in C#?

WBOY
WBOYforward
2023-09-04 08:17:02782browse

C# 中的标点符号是什么?

Punctuation marks are used in C# as special symbols to group or divide code. It includes -

] () {}, ; * = #

For example, = is included in the class and even when declaring the variable. The statement ends with a semicolon -

int a = 10;

In a class, use curly braces -

class Demo {
}

When declaring a dictionary -

var d = new Dictionary<string, int>(5);

It is also used when declaring and initializing a list -

List<string> myList = new List<string>() {
   "mammals",
   "reptiles",
   "amphibians"
};

The above is the detailed content of What are punctuation marks in C#?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete