TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Bkr Knk
NA
19
3.1k
c# orderby wrong ordering
Apr 1 2018 6:17 AM
foreach
(var item
in
items.SearchQuery(textBox1.Text, 1))
{
Video video =
new
Video();
video.Url = item.Url;
list.Add(video);
using
(var client =
new
WebClient())
{
var html = client.DownloadString(video.Url);
// HtmlAgilityPack class
var htmlDoc =
new
HtmlAgilityPack.HtmlDocument();
htmlDoc.LoadHtml(html);
var htmlElement = htmlDoc.DocumentNode.Element(
"meta"
);
HtmlNode mdnode =
htmlDoc.DocumentNode.SelectSingleNode(
"//meta[@name='keywords']"
);
var htmlAtribute = mdnode.Attributes[
"content"
];
string
fulldescription = htmlAtribute.Value;
byte
[] bytes = Encoding.Default.GetBytes(fulldescription);
fulldescription = Encoding.UTF8.GetString(bytes);
string
text = fulldescription;
Collection<
string
> collection =
new
Collection<
string
>();
string
[] bits = text.Split(
','
);
foreach
(
string
rr
in
bits)
{
collection.Add(rr);
}
var sortedElements = from rr
in
collection
orderby rr.Length descending
select rr;
foreach
(
string
c
in
sortedElements)
{
listbox1.Items.Add(c);
}
}
}
}
The Output :( As you can see , it is ordering part by part, but i want full order which should includes all items in the listbox
Reply
Answers (
2
)
Checking and unchecking a checklistbox base on combo values
How to set region/Language for Youtube Search