doc: update cs.md #153 #152

This commit is contained in:
jaywcjlove 2022-11-21 10:28:58 +08:00
parent 516aed9f11
commit 1ae50452f5

View File

@ -82,7 +82,7 @@ Console.WriteLine(name); // => John Doe
### 用户输入 ### 用户输入
```cs ```cs showLineNumbers
Console.WriteLine("Enter number:"); Console.WriteLine("Enter number:");
if(int.TryParse(Console.ReadLine(),out int input)) if(int.TryParse(Console.ReadLine(),out int input))
{ {
@ -90,7 +90,6 @@ if(int.TryParse(Console.ReadLine(),out int input))
Console.WriteLine($"You entered {input}"); Console.WriteLine($"You entered {input}");
} }
``` ```
<!--rehype:className=wrap-text-->
### 条件判断 ### 条件判断
@ -170,7 +169,7 @@ Console.WriteLine(name); // => John Doe
### 逐字字符串 ### 逐字字符串
```cs ```cs showLineNumbers
string longString = @"I can type any characters in here !#@$%^&*()__+ '' \n \t except double quotes and I will be taken literally. I even work with multiple lines."; string longString = @"I can type any characters in here !#@$%^&*()__+ '' \n \t except double quotes and I will be taken literally. I even work with multiple lines.";
``` ```
<!--rehype:className=wrap-text--> <!--rehype:className=wrap-text-->
@ -199,10 +198,7 @@ Console.WriteLine(sb.ToString());
对于频繁拼接字符串的场景(如:成百上千次循环),使用 `System.Text.StringBuilder` 提升性能 对于频繁拼接字符串的场景(如:成百上千次循环),使用 `System.Text.StringBuilder` 提升性能
<!--rehype:className=wrap-text-->
### 原始字符串文本 ### 原始字符串文本
<!--rehype:wrap-class=col-span-2--> <!--rehype:wrap-class=col-span-2-->
```cs ```cs
@ -217,13 +213,11 @@ string multiLine = """
Console.WriteLine(multiLine); // => Content begin "Hello World!" /\n<>"" end. Console.WriteLine(multiLine); // => Content begin "Hello World!" /\n<>"" end.
``` ```
<!--rehype:className=wrap-text-->
杂项 杂项
----------- -----------
### 常用 .NET 概念 ### 常用 .NET 概念
<!--rehype:wrap-class=col-span-2--> <!--rehype:wrap-class=col-span-3-->
概念 | 中文名 | 定义 概念 | 中文名 | 定义
:- | -|-- :- | -|--