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

What are punctuation marks in C#?

WBOY
Release: 2023-09-04 08:17:02
forward
783 people have browsed it

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

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

] () {}, ; * = #
Copy after login

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

int a = 10;
Copy after login

In a class, use curly braces -

class Demo {
}
Copy after login

When declaring a dictionary -

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

It is also used when declaring and initializing a list -

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

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!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template