Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

How do I call a string inside a different class

public List<CardData> MyAddFunction()
{
  var cardDataList = new List<CardData>();
  cardDataList.Add(new CardData() { cardType = boxLine1, cardColor = randColor });
  return cardDataList;
}

static void Main(string[] args){
  this.cardDataList = MyAddFunction();
  Console.WriteLine(this.cardDataList.FirstOrDefault().CardType);
}
 
PREVIOUS NEXT
Tagged: #How #I #call #string #class
ADD COMMENT
Topic
Name
1+8 =