使用System;
我正在使用string [] talentSlots = new string [2]; 我想做一个agent.talentSlots =等等等等我该怎么做?
namespace warhammerRPGCB
{
public class classes
{
string className;
int stanceRed;
int standGreen;
string carrerSkills;
string primaryChar;
string[] talentSlots = new string[2];
int focusSlot;
int reputationSlot;
int tacticSlot;
public classes()
{
classes agent = new classes();
agent.className = "Agent";
agent.carrerSkills = "Charm, Education, Folklore, Guile, Intution";
agent.stanceRed = 2;
agent.standGreen = 2;
agent.primaryChar = "Intelligence, Felloship";
agent.tacticSlot = focusTalent, reputationTalent;
}
}
}
答案 0 :(得分:2)
您可以使用数组初始值设定项
agent.talentSlots = new string[] {focusTalent,reputationTalent};