How to convert the Commo separated string into the Array
How to convert the Commo separated string into the Array
For Example, we have the Comma separated values in the Permater
then we need to apply the following things :
public string GenerateTest(string studid="", string checkstdid = "", string totalmaekstdid = "", string obtaunstdid = "", string stdattandancestdid = "")
{
int[] Studentid = studid.Split(',').Select(int.Parse).ToArray(); // Convert.ToInt64(studid.Split(','));
bool[] check = checkstdid.Split(',').Select(bool.Parse).ToArray(); //new bool[Checked_StudentArray.Length];
decimal[] totalmark = totalmaekstdid.Split(',').Select(decimal.Parse).ToArray(); //new decimal[totalmarkstdArray.Length];
decimal[] obtaintdmark = obtaunstdid.Split(',').Select(decimal.Parse).ToArray(); //new decimal[obtaunstdiddArray.Length];
string[] attendence = stdattandancestdid.Split(','); // new string[stdattandancestdid.Length];
}
Share This with your friend by choosing any social account