Quantcast
Channel: RobVolk.com » C#
Browsing all 5 articles
Browse latest View live

C# Parallelism: Executing Methods in Parallel in .NET 3.5

To fully take advantage of multi-core processors and to speed up response times, developers have to embrace parallel design patterns.  Most of the code we write today is in serial; we execute one...

View Article



LINQ: Select an object, but change some properties without creating a new object

Q: Using LINQ, if I wanted to perform some query and return the object from the query, but change only some of the properties in that object, how would I do this without creating a new object and...

View Article

Parallel ForEach Loop in C# 3.5

You can take advantage of multi-core processors and execute foreach loops in parallel.  This works especially well when getting multiple chunks of data from external data sources such as a database,...

View Article

Parse the Domain from a URL String with a C# Extension Method

Many times I’ll need to parse the domain name, including the http[s]:// from a URL.  Yet there’s no straightforward way to get it using the Uri class.  This is especially useful when writing custom...

View Article

Truncate HTML String C# Extension Method

My client, a super-huge pharmaceutical company, gave me a particularly good challenge: take a string of HTML and truncate it to a maximum amount of characters, keeping only whole words and all markup....

View Article

Browsing all 5 articles
Browse latest View live




Latest Images