C#

TwitterFacebook
Get flash to fully experience Pearltrees
http://msdn.microsoft.com/en-us/magazine/cc163649.aspx Wandering Code Write Mobile Agents In .NET To Roam And Interact On Your Network Matt Neely Code download available at: MobileAgents.exe (145 KB)

Write Mobile Agents In .NET To Roam And Interact On Your Network

Why? Recently, I started seeing numerous requests regarding creation of custom permissions that do not inherit from CodeAccessPermission and thus do not perform stackwalk. There is nothing special about implementing such classes. In fact, it is easier then with CodeAccessPermission as a base.

Sample of non-CAS custom permission with declarative form supported. - Eugene Bobukh's WebLog

http://blogs.msdn.com/b/eugene_bobukh/archive/2004/03/10/87645.aspx
In this series of Demystifying C# 3.0 we have already covered - a) Demystifying C# 3.0 - Part 1: Implicitly Typed Local Variables "var" b) Demystifying C# 3.0 - Part 2: Anonymous Types c) Demystifying C# 3.0 - Part 3: Extension Methods d) Demystifying C# 3.0 - Part 4: Lambda Expressions e) Demystifying C# 3.0 - Part 5: Object and Collection Initializers f) Demystifying C# 3.0 - Part 6: (LINQ) Query Expression Translation (to C# 3.0) Thank you to both Eric Wise , and C. Steen for linking. The more people we have look at these posts, the better the overall discussion quality will be. Okay, so next we will be talking about "Expression Trees".

Demystifying C# 3.0 - Part 7: Expression Trees

http://blah.winsmarts.com/2006/05/23/demystifying-c-30--part-7-expression-trees.aspx
In this series of Demystifying C# 3.0 we have already covered - a) Demystifying C# 3.0 - Part 1: Implicitly Typed Local Variables "var" b) Demystifying C# 3.0 - Part 2: Anonymous Types c) Demystifying C# 3.0 - Part 3: Extension Methods d) Demystifying C# 3.0 - Part 4: Lambda Expressions e) Demystifying C# 3.0 - Part 5: Object and Collection Initializers I *strongly* recommend reading up the above in sequence before reading this post. This is, (I feel) a rather good post, that will set LINQ in your mind clearly. If you rush through this post, you will waste this opportunity.

Demystifying C# 3.0 - Part 6: (LINQ) Query Expression Translation (to C# 3.0)

http://blah.winsmarts.com/2006/05/21/demystifying-c-30--part-6-linq-query-expression-translation-to-c-30.aspx

Demystifying C# 3.0 - Part 4: Lambda Expressions

http://blah.winsmarts.com/2006/05/19/demystifying-c-30--part-4-lambda-expressions.aspx In the Demystifying C# 3.0, I've already talked about - a) Demystifying C# 3.0 - Part 1: Implicitly Typed Local Variables "var" b) Demystifying C# 3.0 - Part 2: Anonymous Types c) Demystifying C# 3.0 - Part 3: Extension Methods Lets next talk about Lambda Expressions. The best way I can describe Lambda Expressions are - C# Anonymous Methods, only a lot cooler. So what is an anonymous method in C# 2.0? Well y'know you can write code like below in C# 1.x/2.x -

Demystifying C# 3.0 - Part 3: Extension Methods

http://blah.winsmarts.com/2006/05/18/demystifying-c-30--part-3-extension-methods.aspx If you've been following my blog, you would have noticed that I've been trying to talk about new C# 3.0 features one by one. I am trying to take the technical jargon out, and bring these features down to an understandable level. You may want to read the two features I have already talked about below - a) Demystifying C# 3.0 - Part 1: Implicitly Typed Local Variables "var" b) Demystifying C# 3.0 - Part 2: Anonymous Types
In my last blog entry , I had talked about Implicitly typed local variables and the "var" keyword. If you have stumbled across this post through a search engine, or otherwise, I would recommend reading that first. Assuming that you understand "var" - lets dive into part 2 of Demystifying C#3.0 ~ Anonymous Types. http://blah.winsmarts.com/2006/05/17/demystifying-c-30--part-2-anonymous-types.aspx

Demystifying C# 3.0 - Part 2: Anonymous Types

I am going to publish a series of blogposts that intend to bring C# 3.0 down to earth. C# 3.0, along with LINQ, and all the heavy duty talk that surrounds it has sort of made it difficult to understand IMO. Well - if not difficult to understand, it sure is tough to gauge - "Where to begin". So with 5 minutes a day, a short post a day will dice and slice a single feature, and we will logically move to a fuller picture of C# 3.0, followed by LINQ, and DLINQ (if I still have steam left). http://blah.winsmarts.com/2006/05/17/demystifying-c-30--part-1-implicitly-typed-local-variables-var.aspx

Demystifying C# 3.0 - Part 1: Implicitly Typed Local Variables "var"

Cutting Edge: Customize Your Open File Dialog

http://msdn.microsoft.com/en-us/magazine/cc300434.aspx Cutting Edge Customize Your Open File Dialog Dino Esposito Code download available at: CuttingEdge0303.exe (96 KB) Browse the Code Online Displaying an Open File dialog is certainly easy in the Microsoft® .NET Framework with Windows® Forms, but the resulting window is not as customizable as when you create it through the Win32® API. With Windows 2000, Microsoft added a nice feature—the places bar, which is the vertical toolbar that appears on the left side of the window to let you select a frequently visited folder.
http://msdn.microsoft.com/en-us/library/yctbsyf4(v=vs.71).aspx The .NET Framework supplies a set of code access permission classes designed to help protect a specific set of resources and operations, focusing on those resources exposed by the .NET Framework. These permission classes are described briefly in the Permissions topic and in detail in the reference documentation for each permission class. For most environments, the built-in code access permissions are adequate. However, in some situations, it might make sense to define your own code access permission class.

Creating Your Own Code Access Permissions

Class Data Binding using Custom Attributes

Introduction At the end of this article, you should be comfortable using Custom Attributes. This article focuses on using them in order to create a quick, flexible data binding mechanism. Prerequisite Experience/Knowledge

Why are NameValueCollection lookups slower than Hashtable? [Kim Hamilton] - BCL Team Blog

An internal discussion came up recently on the performance difference of lookups in Hashtable versus NameValueCollection. Benchmarks revealed that NVC lookups were ~2-8 times slower than Hashtable. For example, when doing 40,000 lookups on a collection size of 100,000, NameValueCollection is about 2.6x worse:

.NET Matters: ICustomTypeDescriptor, Part 1

.NET Matters ICustomTypeDescriptor, Part 1 Stephen Toub Code download available at: NETMatters0504.exe (163 KB) Q I write a lot of one-off utilities for personal use, and since they don't require any sophisticated user interfaces, I often use a System.Windows.Forms.PropertyGrid bound to a settings class in order to allow the user to configure a tool's operations. Unfortunately, sometimes I don't write these settings classes, and often they've been constructed in a way that's incompatible with the PropertyGrid.
The code download has been updated for the final release of the Enterprise Library, including design support for the EntLibConfig application. Introduction A group of programmers, far smarter than I, have been laboring from some time to create a library of utilities to help developers like myself to create better applications. The fruits of that labor is the Enterprise Library from the Patterns & Practices group at Microsoft.

An MSN Messenger Log Listener

Avoiding configuration pitfalls with incompatible copies of Enterprise Library - Tom Hollander's blog

When you install Enterprise Library 3.0, you actually get two distinct copies of the library. One copy is in the form of pre-compiled binaries - by default these get installed to "C:\Program Files\Microsoft Enteprise Library 3.0 - April 2007\bin". The other copy is in the form of source code, which by default will be compiled and the assemblies coped to "C:\EntLib3Src\App Blocks\bin". While both copies of Enterprise Library contain identical code, there is one critical difference: the pre-compiled binaries are strong-named (with a Microsoft key that we do not ship), and the assemblies compiled from the source code are not initially strong-named.