c# program to remove duplicate elements from a given integer using linq? -


it should using linq only.for example if integer 123444 taken,then should print 1234. unable single integer.i can list of integers.

you can converting int string , getting digits in array. applying distinct remove duplicates array. once have array of unique digit can make string using join. parsing string int give number duplicate digits in it.

int j = int.parse(string.join("",i.tostring().toarray().distinct())); 

Comments

Popular posts from this blog

php - Wordpress: Link a post to posts of another category manually -

delphi xe7 upload/download dropbox file using the rest client and show progress -

java - Get more than One value and display it -