|
-
Feb 14th, 2022, 01:55 PM
#21
Thread Starter
Lively Member
Re: [vb.net] Sorting decimal in ascending order in richtextbox
 Originally Posted by Niya
Actually, the comparison is numeric:-
Code:
RichTextBox1.Lines = RichTextBox1.Lines.
Where(Function(x) Not String.IsNullOrEmpty(x)).
OrderBy(Function(x) Decimal.Parse(x.Split(" "c)(0))).ToArray
The String is converted to a Decimal in the OrderBy clause.
it might be that the cultureinfo changes between dot and commas?
just guessing
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|