Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/312.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 如何将数组与使用点运算符的类一起使用_C#_Arrays_Class - Fatal编程技术网

C# 如何将数组与使用点运算符的类一起使用

C# 如何将数组与使用点运算符的类一起使用,c#,arrays,class,C#,Arrays,Class,使用制度 我正在使用字符串[]talentSlots=新字符串[2]; 我想做一个代理。talentSlots=诸如此类的事情我该怎么做 可以使用数组初始值设定项 agent.talentSlots = new string[] {focusTalent,reputationTalent}; 请注意,可以推断数组类型:agent.talentSlots=new[]{focusTalent,信誉人才} agent.talentSlots = new string[] {focusTalent,r

使用制度

我正在使用字符串[]talentSlots=新字符串[2]; 我想做一个代理。talentSlots=诸如此类的事情我该怎么做


可以使用数组初始值设定项

agent.talentSlots = new string[] {focusTalent,reputationTalent};

请注意,可以推断数组类型:
agent.talentSlots=new[]{focusTalent,信誉人才}
agent.talentSlots = new string[] {focusTalent,reputationTalent};