You’ve all seen it before, you hit a webpage with a menu on the left and somewhere in the main section it says something like “for more look at the left menu”.
This article explains why you should use the
Any() method over
Count() in LINQ to SQL.
Say you have two (or more)
Dictionary objects and want their contents merged, this can be done with LINQ very conveniently like so.
There are a lot of questions on Stack Overflow, probably a lot than you realise. This is understandable when you consider over 7,000 questions are being asked every day. No I’m not just talking about the 5 million odd that you can access via the questions tab (4,930,418 and counting at time of writing). There are also a ridiculous amount of deleted questions which only users with at least 10,000 reputation can see.
The CSS property
background-size:cover is incredibly useful but due to the nature of it resizing in different directions, it’s difficult to pinpoint where a particular part of the image is on the background at any given time. Difficult but not impossible of course.
<table>’s header scroll with the page. What sparked this little endeavour was a question asking for this functionality on Stack Overflow. Since it was fun answering the question, I thought I’d go ahead and make a more general plugin type solution that worked for multiple tables.
This article introduces a way to clear floats using pseudo-elements on a wrapping element.
You may ask yourself why you would ever want to pass a reference type into a method using the
ref keyword, or why the C# compiler even allows this. Using
ref on a reference type is actually slightly different to not using it. The difference is that the
ref keyword makes it a reference (pointer) to the variable, not just the object. This allows assigning to the source variable of the parameter from within the method.