Get flash to fully experience Pearltrees
Wandering Code Write Mobile Agents In .NET To Roam And Interact On Your Network Matt Neely Code download available at: MobileAgents.exe (145 KB)
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.
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".
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.
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 -
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.
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).
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.
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.
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
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 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.