c# - Split a word into an array of unique letters -


how split string array of unique characters using c#?

i know code below splits string array, won't pick out unique characters:

string s = "robot"; char[] chararray = s.tochararray(); (int = 0; < chararray.length; i++) {  console.writeline(chararray[i]); } 

this done easy linq:

char[] chararray = s.tochararray().distinct().toarray() 

Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -