|
|
Browse by Tags
All Tags » c# » C# 2.0
-
On our project we were noticing a massive performance penalty when sending a number of records to the database to either be inserted or updated via the standard NHibernate framework syntax, so we decided to see if we could do anything about this. Turns out that we were able to alter the query that NHibernate normally generated, and change it into ...
-
Copy a stack trace to your clipboard, open the resharper stack trace explorer, and hit Ctrl+E, T. Once you’ve done this the lines reported in the stack trace become hyperlinks to the files in your project.
-
A colleague of mine just showed me how to get nice looking C# code blocks into my blog site.
Go into your blog dashboard and go to Global Settings, Title, Description and News. In the RawHeader box, paste in the following: <script type="text/javascript" ...
-
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.IO;
namespace DataSetSerializer
{
class Program
{
static void Main(string[] args)
...
-
See this article here...
http://kashfarooq.wordpress.com/2008/11/29/mocking-wcf-services-with-rhinomocks/
-
For those who like me didn’t know about this hidden gem:
You can now set Tracepoints instead of just Breakpoints in VS2008. Here’s the difference between the two as described on MSDN:
“Breakpoints tell the debugger that an application should break, pause execution, at a certain point. When a break occurs, your program and the ...
-
Just came across a nasty gotcha today, where by we were trying to use the new C# 3.5 syntax
var x = from item in items select new Item { ItemName = item.Name };
and getting a compile error. Turns out this was due to the need to have the following using statement (that doesn't come up in a smart tag prompt when you're writing linq),
using ...
-
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe /DesignMode /u /ShowCallStack /Configuration="C:\Data\Merrick\Projects\Data Access Guidance Package\Data Access Guidance Package\Data Access Guidance Package\bin\Debug\\Data Access Guidance Package.xml" "C:\Data\Merrick\Projects\Data Access Guidance Package\Data Access ...
-
A colleague of mine recently asked for how to create a one liner to iterate over the items in a list. In C# 2.0 this is best done using the System.Action<T> delegate ForEach method, as it reduces the lines of code that you would normally write.
Easy way to think of it, is to write the foreach loop in the normal way, then change the foreach ...
-
Check out the flex wiki site below. Has C# code examples for most if not all of the Windows API. Really useful for Windows programming.
www.pinvoke.net
|
|
|