增加C#的关键字和stringApi (#762)

This commit is contained in:
ihuadz
2024-03-11 15:21:25 +08:00
committed by GitHub
parent f2b13ef7d7
commit 04b6287067
3 changed files with 968 additions and 0 deletions

View File

@@ -0,0 +1,470 @@
[
{
"name": "abstract",
"trans": [
"abstract:声明抽象类或抽象成员,用于定义不能直接实例化的类或不能直接访问的成员"
]
},
{
"name": "as",
"trans": [
"as:类型转换关键字,用于将对象转换为另一种类型,如果转换失败,则返回 null"
]
},
{
"name": "base",
"trans": [
"base:表示基类的关键字,用于访问基类的成员或调用基类的构造函数"
]
},
{
"name": "bool",
"trans": [
"bool:表示布尔型数据类型,只能存储 true 或 false"
]
},
{
"name": "break",
"trans": [
"break:用于跳出循环或 switch 语句"
]
},
{
"name": "byte",
"trans": [
"byte:表示 8 位无符号整数类型,范围为 0 到 255"
]
},
{
"name": "case",
"trans": [
"case:switch 语句中的分支标签"
]
},
{
"name": "catch",
"trans": [
"catch:用于捕获异常的关键字,在 try-catch 块中使用"
]
},
{
"name": "char",
"trans": [
"char:表示 16 位 Unicode 字符"
]
},
{
"name": "checked",
"trans": [
"checked:用于启用整数算术的溢出检查"
]
},
{
"name": "class",
"trans": [
"class:声明类的关键字,用于定义对象的蓝图"
]
},
{
"name": "const",
"trans": [
"const:声明常量的关键字,表示其值在编译时是固定的"
]
},
{
"name": "continue",
"trans": [
"continue:用于终止当前循环迭代并继续下一次迭代"
]
},
{
"name": "decimal",
"trans": [
"decimal:表示高精度的十进制数"
]
},
{
"name": "default",
"trans": [
"default:switch 语句中的默认标签"
]
},
{
"name": "delegate",
"trans": [
"delegate:用于声明委托类型"
]
},
{
"name": "do",
"trans": [
"do:表示 do-while 循环的关键字"
]
},
{
"name": "double",
"trans": [
"double:表示双精度浮点数类型"
]
},
{
"name": "else",
"trans": [
"else:表示 if-else 语句中的否定条件"
]
},
{
"name": "enum",
"trans": [
"enum:用于声明枚举类型"
]
},
{
"name": "event",
"trans": [
"event:声明事件的关键字,用于在类或结构中定义事件成员"
]
},
{
"name": "explicit",
"trans": [
"explicit:声明显式转换运算符的关键字"
]
},
{
"name": "extern",
"trans": [
"extern:声明外部方法、字段或事件的关键字,与外部 C/C++ 代码进行交互"
]
},
{
"name": "false",
"trans": [
"false:表示布尔型的 false 值"
]
},
{
"name": "finally",
"trans": [
"finally:在异常处理中使用的关键字,表示无论是否发生异常,都会执行的代码块"
]
},
{
"name": "fixed",
"trans": [
"fixed:用于固定托管对象的关键字,通常与指针相关"
]
},
{
"name": "float",
"trans": [
"float:表示单精度浮点数类型"
]
},
{
"name": "for",
"trans": [
"for:表示 for 循环的关键字"
]
},
{
"name": "foreach",
"trans": [
"foreach:用于循环访问集合或数组中的元素"
]
},
{
"name": "goto",
"trans": [
"goto:用于无条件转移到代码中的另一个标签"
]
},
{
"name": "if",
"trans": [
"if:表示条件语句中的条件分支"
]
},
{
"name": "implicit",
"trans": [
"implicit:声明隐式转换运算符的关键字"
]
},
{
"name": "in",
"trans": [
"in:在 foreach 循环中指定集合的关键字"
]
},
{
"name": "int",
"trans": [
"int:表示整数类型"
]
},
{
"name": "interface",
"trans": [
"interface:声明接口的关键字,用于定义类似于抽象类的契约"
]
},
{
"name": "internal",
"trans": [
"internal:表示访问级别为程序集的关键字,只能在当前程序集中访问"
]
},
{
"name": "is",
"trans": [
"is:用于检查对象是否为特定类型的关键字"
]
},
{
"name": "lock",
"trans": [
"lock:用于同步访问共享资源的关键字"
]
},
{
"name": "long",
"trans": [
"long:表示长整数类型"
]
},
{
"name": "namespace",
"trans": [
"namespace:声明命名空间的关键字,用于组织和管理代码"
]
},
{
"name": "new",
"trans": [
"new:用于创建新对象的关键字,也可用于隐藏基类中的成员"
]
},
{
"name": "null",
"trans": [
"null:表示空引用的关键字"
]
},
{
"name": "object",
"trans": [
"object:表示对象类型,是所有其他类型的基类"
]
},
{
"name": "operator",
"trans": [
"operator:声明运算符重载的关键字"
]
},
{
"name": "out",
"trans": [
"out:用于参数声明中,表示参数是输出参数"
]
},
{
"name": "override",
"trans": [
"override:用于重写基类中的虚成员"
]
},
{
"name": "params",
"trans": [
"params:用于指定函数参数的可变数量"
]
},
{
"name": "private",
"trans": [
"private:表示访问级别为私有的关键字,只能在声明它的类或结构中访问"
]
},
{
"name": "protected",
"trans": [
"protected:表示访问级别为受保护的关键字,只能在声明它的类或派生类中访问"
]
},
{
"name": "public",
"trans": [
"public:表示访问级别为公共的关键字,可以在任何地方访问"
]
},
{
"name": "readonly",
"trans": [
"readonly:声明只读字段的关键字,只能在声明时或构造函数中初始化"
]
},
{
"name": "ref",
"trans": [
"ref:用于传递参数的引用的关键字"
]
},
{
"name": "return",
"trans": [
"return:用于从方法中返回值的关键字"
]
},
{
"name": "sbyte",
"trans": [
"sbyte:表示 8 位有符号整数类型"
]
},
{
"name": "sealed",
"trans": [
"sealed:声明密封类的关键字,防止其他类继承该类"
]
},
{
"name": "short",
"trans": [
"short:表示短整数类型"
]
},
{
"name": "sizeof",
"trans": [
"sizeof:用于获取未托管类型的大小"
]
},
{
"name": "stackalloc",
"trans": [
"stackalloc:在堆栈上分配内存的关键字"
]
},
{
"name": "static",
"trans": [
"static:表示静态成员的关键字,静态成员属于类而不是实例"
]
},
{
"name": "string",
"trans": [
"string:表示字符串类型"
]
},
{
"name": "struct",
"trans": [
"struct:声明结构的关键字,结构是值类型"
]
},
{
"name": "switch",
"trans": [
"switch:表示 switch 语句的关键字,用于多路分支选择"
]
},
{
"name": "this",
"trans": [
"this:表示当前实例的关键字"
]
},
{
"name": "throw",
"trans": [
"throw:用于抛出异常的关键字"
]
},
{
"name": "true",
"trans": [
"true:表示布尔型的 true 值"
]
},
{
"name": "try",
"trans": [
"try:用于定义可能会引发异常的代码块的关键字"
]
},
{
"name": "typeof",
"trans": [
"typeof:用于获取类型对象的关键字"
]
},
{
"name": "uint",
"trans": [
"uint:表示 32 位无符号整数类型"
]
},
{
"name": "ulong",
"trans": [
"ulong:表示 64 位无符号整数类型"
]
},
{
"name": "unchecked",
"trans": [
"unchecked:用于禁用整数算术的溢出检查"
]
},
{
"name": "unsafe",
"trans": [
"unsafe:声明不安全代码块的关键字,用于使用指针和执行不安全操作"
]
},
{
"name": "ushort",
"trans": [
"ushort:表示 16 位无符号整数类型"
]
},
{
"name": "using",
"trans": [
"using:声明命名空间或引用 IDisposable 对象的关键字,用于资源管理和代码组织"
]
},
{
"name": "var",
"trans": [
"var:用于声明隐式类型的关键字,由编译器推断类型"
]
},
{
"name": "virtual",
"trans": [
"virtual:声明虚成员的关键字,允许在派生类中重写"
]
},
{
"name": "void",
"trans": [
"void:表示方法不返回任何值的关键字"
]
},
{
"name": "volatile",
"trans": [
"volatile:声明字段可能被多个线程同时访问的关键字,用于多线程编程"
]
},
{
"name": "while",
"trans": [
"while:表示 while 循环的关键字"
]
}
]

View File

@@ -0,0 +1,476 @@
[
{
"name": "Clone()",
"trans": [
"Clone()创建当前字符串的浅表副本"
]
},
{
"name": "Compare(string, string)",
"trans": [
"比较两个指定的字符串,并返回一个表示它们在字典顺序中的相对位置的整数"
]
},
{
"name": "Compare(string, string, bool)",
"trans": [
"比较两个指定的字符串,并返回一个表示它们在字典顺序中的相对位置的整数,或指示是否忽略大小写的布尔值"
]
},
{
"name": "Compare(string, int, string, int, int)",
"trans": [
"比较两个指定的字符串的指定部分,并返回一个表示它们在字典顺序中的相对位置的整数"
]
},
{
"name": "CompareOrdinal(string, string)",
"trans": [
"比较两个指定的字符串,并返回一个表示它们在 Unicode 编码顺序中的相对位置的整数"
]
},
{
"name": "CompareTo(object)",
"trans": [
"将此实例与指定的对象进行比较,并返回一个表示它们在字典顺序中的相对位置的整数"
]
},
{
"name": "CompareTo(string)",
"trans": [
"将此实例与指定的字符串进行比较,并返回一个表示它们在字典顺序中的相对位置的整数"
]
},
{
"name": "Concat(string, string)",
"trans": [
"将两个指定的字符串连接到一起"
]
},
{
"name": "Concat(string, string, string)",
"trans": [
"将三个指定的字符串连接到一起"
]
},
{
"name": "Concat(string, string, string, string)",
"trans": [
"将四个指定的字符串连接到一起"
]
},
{
"name": "Concat(string[])",
"trans": [
"将指定数组中的所有字符串连接到一起"
]
},
{
"name": "Contains(string)",
"trans": [
"返回一个值,该值指示指定的字符串是否出现在此字符串中"
]
},
{
"name": "Copy(string)",
"trans": [
"创建指定字符串的副本"
]
},
{
"name": "CopyTo(int, char[], int, int)",
"trans": [
"从此实例中的指定位置开始将字符复制到字符数组中的指定位置"
]
},
{
"name": "EndsWith(string)",
"trans": [
"确定此字符串实例的结尾是否与指定的字符串匹配"
]
},
{
"name": "Equals(object)",
"trans": [
"确定指定的对象是否等于当前对象"
]
},
{
"name": "Equals(string)",
"trans": [
"确定此字符串实例是否与另一个字符串实例具有相同的值"
]
},
{
"name": "Format(IFormatProvider, string, object)",
"trans": [
"使用指定的格式信息以及要格式化的对象的指定值,返回指定字符串格式的格式化字符串"
]
},
{
"name": "Format(string, object)",
"trans": [
"使用指定的格式字符串和要插入到该字符串中的对象的参数数组,返回格式化的字符串"
]
},
{
"name": "GetEnumerator()",
"trans": [
"返回一个枚举数,该枚举数可用于迭代字符串中的字符"
]
},
{
"name": "GetHashCode()",
"trans": [
"用作默认哈希函数"
]
},
{
"name": "GetType()",
"trans": [
"获取当前实例的 Type"
]
},
{
"name": "IndexOf(char)",
"trans": [
"返回指定字符在此字符串中第一次出现的位置"
]
},
{
"name": "IndexOf(char, int)",
"trans": [
"返回指定字符在此字符串中第一次出现的位置,从指定的索引位置开始搜索"
]
},
{
"name": "IndexOf(char, int, int)",
"trans": [
"返回指定字符在此字符串中第一次出现的位置,搜索范围从指定的索引开始,并且包括指定数量的字符"
]
},
{
"name": "IndexOf(string)",
"trans": [
"返回指定字符串在此字符串中第一次出现的位置"
]
},
{
"name": "IndexOf(string, int)",
"trans": [
"返回指定字符串在此字符串中第一次出现的位置,从指定的索引位置开始搜索"
]
},
{
"name": "IndexOf(string, int, int)",
"trans": [
"返回指定字符串在此字符串中第一次出现的位置,搜索范围从指定的索引开始,并且包括指定数量的字符"
]
},
{
"name": "IndexOfAny(char[])",
"trans": [
"返回指定数组中的任何一个字符在此字符串中第一次出现的位置"
]
},
{
"name": "IndexOfAny(char[], int)",
"trans": [
"返回指定数组中的任何一个字符在此字符串中第一次出现的位置,搜索范围从指定的索引位置开始"
]
},
{
"name": "IndexOfAny(char[], int, int)",
"trans": [
"返回指定数组中的任何一个字符在此字符串中第一次出现的位置,搜索范围从指定的索引开始,并且包括指定数量的字符"
]
},
{
"name": "Insert(int, string)",
"trans": [
"返回一个新字符串,其中指定的字符串被插入到此字符串中的指定索引位置"
]
},
{
"name": "Intern(string)",
"trans": [
"将指定的字符串添加到字符串池中,或者返回池中已存在的引用"
]
},
{
"name": "IsInterned(string)",
"trans": [
"返回在字符串池中或者作为动态分配的字符串中找到的指定字符串的引用"
]
},
{
"name": "IsNormalized()",
"trans": [
"确定此字符串是否为 Unicode 规范化形式 C"
]
},
{
"name": "IsNullOrEmpty(string)",
"trans": [
"指示指定的字符串是否为 null 或者是一个空字符串"
]
},
{
"name": "IsNullOrWhiteSpace(string)",
"trans": [
"指示指定的字符串是否为 null、空字符串或者仅由空白字符组成"
]
},
{
"name": "Join(string, string[])",
"trans": [
"使用指定的分隔符将指定数组中的所有字符串连接到一起"
]
},
{
"name": "Join(string, string[], int, int)",
"trans": [
"使用指定的分隔符将指定数组中的一个子集的所有字符串连接到一起"
]
},
{
"name": "Join<T>(string, IEnumerable<T>)",
"trans": [
"将指定可枚举集合中的所有字符串连接到一起,其中这些字符串用指定的分隔符分隔"
]
},
{
"name": "Join<T>(string, IEnumerable<T>, int, int)",
"trans": [
"将指定可枚举集合中的一个子集的所有字符串连接到一起,其中这些字符串用指定的分隔符分隔"
]
},
{
"name": "LastIndexOf(char)",
"trans": [
"返回指定字符在此字符串中最后一次出现的位置"
]
},
{
"name": "LastIndexOf(char, int)",
"trans": [
"返回指定字符在此字符串中最后一次出现的位置,搜索范围从指定的索引位置开始"
]
},
{
"name": "LastIndexOf(char, int, int)",
"trans": [
"返回指定字符在此字符串中最后一次出现的位置,搜索范围从指定的索引开始,并且包括指定数量的字符"
]
},
{
"name": "LastIndexOf(string)",
"trans": [
"返回指定字符串在此字符串中最后一次出现的位置"
]
},
{
"name": "LastIndexOf(string, int)",
"trans": [
"返回指定字符串在此字符串中最后一次出现的位置,搜索范围从指定的索引位置开始"
]
},
{
"name": "LastIndexOf(string, int, int)",
"trans": [
"返回指定字符串在此字符串中最后一次出现的位置,搜索范围从指定的索引开始,并且包括指定数量的字符"
]
},
{
"name": "LastIndexOfAny(char[])",
"trans": [
"返回指定数组中的任何一个字符在此字符串中最后一次出现的位置"
]
},
{
"name": "LastIndexOfAny(char[], int)",
"trans": [
"返回指定数组中的任何一个字符在此字符串中最后一次出现的位置,搜索范围从指定的索引位置开始"
]
},
{
"name": "LastIndexOfAny(char[], int, int)",
"trans": [
"返回指定数组中的任何一个字符在此字符串中最后一次出现的位置,搜索范围从指定的索引开始,并且包括指定数量的字符"
]
},
{
"name": "Normalize()",
"trans": [
"将此字符串转换为 Unicode 规范化形式 C"
]
},
{
"name": "PadLeft(int)",
"trans": [
"将此字符串的开头填充到指定的总宽度,以便达到指定的对齐要求"
]
},
{
"name": "PadLeft(int, char)",
"trans": [
"将此字符串的开头填充到指定的总宽度,以便达到指定的对齐要求,使用指定的填充字符填充"
]
},
{
"name": "PadRight(int)",
"trans": [
"将此字符串的结尾填充到指定的总宽度,以便达到指定的对齐要求"
]
},
{
"name": "PadRight(int, char)",
"trans": [
"将此字符串的结尾填充到指定的总宽度,以便达到指定的对齐要求,使用指定的填充字符填充"
]
},
{
"name": "Remove(int)",
"trans": [
"返回一个新字符串,其中从此实例中的指定位置开始的所有字符都已被删除"
]
},
{
"name": "Remove(int, int)",
"trans": [
"返回一个新字符串,其中从此实例中的指定位置开始且包括指定长度的字符都已被删除"
]
},
{
"name": "Replace(char, char)",
"trans": [
"返回一个新字符串,其中所有出现的指定字符都被替换为另一个指定的字符"
]
},
{
"name": "Replace(string, string)",
"trans": [
"返回一个新字符串,其中所有匹配的指定字符串都被另一个指定的字符串替换"
]
},
{
"name": "Split(char[])",
"trans": [
"使用指定的 Unicode 字符数组中的任何字符作为分隔符,将字符串分割为子字符串数组"
]
},
{
"name": "Split(char[], int)",
"trans": [
"使用指定的 Unicode 字符数组中的任何字符作为分隔符,将字符串分割为子字符串数组,最多返回指定数目的子字符串"
]
},
{
"name": "Split(char[], StringSplitOptions)",
"trans": [
"使用指定的 Unicode 字符数组中的任何字符作为分隔符,将字符串分割为子字符串数组,可选择是否移除空白项"
]
},
{
"name": "Split(string[], StringSplitOptions)",
"trans": [
"使用指定的字符串数组中的任何字符串作为分隔符,将字符串分割为子字符串数组,可选择是否移除空白项"
]
},
{
"name": "StartsWith(string)",
"trans": [
"确定此字符串实例的开头是否与指定的字符串匹配"
]
},
{
"name": "Substring(int)",
"trans": [
"返回一个新字符串,其中包含此实例中从指定位置开始的所有字符"
]
},
{
"name": "Substring(int, int)",
"trans": [
"返回一个新字符串,其中包含此实例中从指定位置开始的指定长度的字符"
]
},
{
"name": "ToCharArray()",
"trans": [
"将此字符串转换为一个字符数组"
]
},
{
"name": "ToCharArray(int, int)",
"trans": [
"将此实例中的指定子字符串中的字符复制到 Unicode 字符数组中"
]
},
{
"name": "ToLower()",
"trans": [
"将此字符串转换为小写"
]
},
{
"name": "ToLowerInvariant()",
"trans": [
"使用固定区域性特定的大小写规则,将字符串转换为小写"
]
},
{
"name": "ToString()",
"trans": [
"返回此实例的字符串表示形式"
]
},
{
"name": "ToUpper()",
"trans": [
"将此字符串转换为大写"
]
},
{
"name": "ToUpperInvariant()",
"trans": [
"使用固定区域性特定的大小写规则,将字符串转换为大写"
]
},
{
"name": "Trim()",
"trans": [
"删除此字符串中指定的一组字符的所有前导和尾随出现"
]
},
{
"name": "Trim(char[])",
"trans": [
"删除此字符串中指定的一组字符的所有前导和尾随出现"
]
},
{
"name": "TrimEnd()",
"trans": [
"删除此字符串末尾处的所有空白字符"
]
},
{
"name": "TrimEnd(char[])",
"trans": [
"删除此字符串末尾处的所有指定字符"
]
},
{
"name": "TrimStart()",
"trans": [
"删除此字符串开始处的所有空白字符"
]
},
{
"name": "TrimStart(char[])",
"trans": [
"删除此字符串开始处的所有指定字符"
]
}
]

View File

@@ -2946,6 +2946,28 @@ const programming: DictionaryResource[] = [
language: 'code',
languageCategory: 'code',
},
{
id: 'csharpKeywords',
name: 'C#关键字',
description: 'C#关键字以及用途',
category: '代码练习',
tags: ['C#'],
url: '/dicts/csharp-keywords.json',
length: 78,
language: 'code',
languageCategory: 'code',
},
{
id: 'csharpString',
name: 'C#: String API',
description: 'C# String API',
category: '代码练习',
tags: ['C#'],
url: '/dicts/csharp-string.json',
length: 79,
language: 'code',
languageCategory: 'code',
},
{
id: 'csharpList',
name: 'C#: List API',