Development With A Dot

Blog on development in general, and specifically on .NET

Sponsors

News

My Friends

My Links

Permanent Posts

Portuguese Communities

February 2011 - Posts

Microsoft Web Camps Training Kits

Microsoft has a nice little site called Web Camps Training Kits where are available a number o training kits - presentation and source code - for some popular technologies:

  • ASP.NET MVC 3
  • IE 9 and HTML 5
  • OData
  • jQuery
  • WebApps (Umbraco, Kentico, DotNetNuke)
  • WebMatrix

All downloads are free and require no registration. Check them out!

Bookmark and Share
Getting Current Native Thread

The native OS threads running in the current process are exposed through the Threads property of the Process class. Please note that this is not the same as a managed thread, these are the actual native threads running on the operating system.

In order to get a pointer to the current executing thread, we must use P/Invoke. Here's how we do it:


[DllImport("kernel32.dll")]
public static extern UInt32 GetCurrentThreadId();

UInt32 id = GetCurrentThreadId();
ProcessThread thread = Process.GetCurrentProcess().Threads.Cast<ProcessThread>().Where(t => t.Id == id).Single();

Bookmark and Share
ODAC Entity Framework and LINQ Beta Released

At last! Get it from here.

Bookmark and Share
More Posts