Contents tagged with LINQ
-
Tweaking log4net Settings Programmatically
A few months ago, I had to dynamically add a log4net appender at runtime. Now I find myself in another log4net situation. I need to modify the configuration of my appenders at runtime.
-
Ann Arbor Day of .NET 2010 Recap
Had a great time at the Ann Arbor Day of .NET on Saturday. Lots of great speakers and topics. And chance to meet up with friends you usually only communicate with via email/twitter.
-
Talks Submitted for Ann Arbor Day of .NET 2010
Just submitted my session abstracts for Ann Arbor's Day of .NET 2010.
-
Flattening a Jagged Array with LINQ
Today I had to flatten a jagged array. In my case, it was a string[][] and I needed to make sure every single string contained in that jagged array was set to something (non-null and non-empty). LINQ made the flattening very easy. In fact, I ended up making a generic version that I could use to flatten any type of jagged array (assuming it's a T[][]):
-
Lookups vs. Dictionaries
Donn Felker has a great post that explains the different uses of LINQ's ToLookup and ToDictionary. Check it out!
-
Looking Forward to 2010
Yes, the first month of 2010 is almost gone and I'm just now getting around blogging about the past year and the year ahead. I guess time management should be on my to-do list for this year?
-
LINQ and Homework
My daughter asked me to check her homework today. One of the math problems was:
-
LINQ2SQL: SubmitChanges() doesn't do anything?
Dear Linq2SQL,
-
Comparing Two Arrays
I was looking at some old code today that was checking if two byte arrays had the same data in them. It was a simple loop that compared each element. I recalled my blog post from November of last year about comparing collections/arrays in MSTest and thought, "I wonder if LINQ has something similar"?
-
LINQ: Quickly Create Dictionaries with ToDictionary
Donn Felker recently blogged about a neat little extension method in LINQ called Any(). If you simply want to know if a sequence contains any elements, many people use ".Count() > 0" which will walk the entire sequence to compute the count whereas .Any() will stop walking as soon as it finds a single element. Easy and much more efficient.