Created
December 21, 2022 09:32
-
-
Save PrashantUnity/9b89a50d2a3f076d1784cd3dfcd7df27 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public List<List<int>> ListFromString(string str) | |
{ | |
return str.Split(']') | |
.Where(x => x.Length > 0) | |
.Select(x=> x | |
.Split(new char[] { '[', ',' }) | |
.Where(m => m.Length > 0) | |
.Select(m => Convert.ToInt32(m)) | |
.ToList()) | |
.ToList(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Making public