string tags = "9,3,12,43,2" List<int> TagIds = tags.Split(',');
This doesn't work cause the split method returns a string[]
Here is one way of doing it:
List<int> TagIds = tags.Split(',').Select(int.Parse).ToList();
How do I convert a list to a string in C#? When I execute toString on a List object, I get: System.Collections.Generic.List`1[System.String]
I have a TextBoxD1.Text and I want to convert it to an int to store it in a database. How can I do this?
How do I convert a string to a byte[] in .NET (C#) without manually specifying a specific encoding? I'm going to encrypt the string. I can encrypt it without converting, but I'd still like to know why encoding comes to …