15,891,607 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Riz Thon (Top 5 by date)
Riz Thon
24-Oct-11 20:47pm
View
Deleted
In case some don't know, the result will not be 100% the same:
- in the 1st case you end up with a List<Student> which is created at once
- in the 2nd case you end up with a IEnumerable<Student> which will be evaluated once you iterate it.
As for me I don't like the SQL way of writing, I prefer students.Where(...).
Also if you do students.Where(s => s.Grade > 9).ToList() you'll end up with exactly the same as in the 1st case.
Riz Thon
22-Aug-11 23:12pm
View
Deleted
Why is getting a IEnumerable<t> removing the limitations? Does it mean that calling AsEnumerable makes it not using Linq2WMI afterwards but Linq To Object? (sorry if my question sounds stupid, I never really thought of how a Linq provider is implemented).
Riz Thon
20-Jun-11 22:18pm
View
Deleted
Interesting extension method, especially for simple things like updating some text. You can write the call like this:
txtOutput.ThreadSafeCall(() => txtOutput.Text = "Updated");
Riz Thon
13-Jun-11 21:08pm
View
Deleted
Compute once and for all which "string" and "string[]" you'll have to use before the "foreach", then inside your "foreach" you'll just have
int index = CharsToReplace.IndexOf(c);
if (index < 0)
sb.Append(c);
else
sb.Append(NewStrings[index]);
Riz Thon
24-May-11 2:22am
View
Deleted
It's true that it'll be slower as you're creating a delegate. As for me I'd just declare a local variable like you (maybe it's because I haven't use VB.Net so I'm not used to have the "with" keyword).