ServicesResourcesConferencesOur TeamWeblogsAboutContact
   

Subscriptions

Post Categories

News

My new books

My Blogroll

INETA UG Leaders

Affiliations

News

Archives

Christian Nagel's OneNotes

.NET Training, Consulting, Coaching & Development


Language (RSS)

C#, C++, VB
C# v.next
C# is a changing language. C# 1.0 was all about core component-support. With C# 2.0 generics have been added. C# 3.0 added LINQ and extensions that are very useful with LINQ such as extension methods, object initializer, collection initializer, anonymous Read More
posted Tuesday, February 19, 2008 7:11 PM with 0 Comments

LINQ Part 5 - Custom Extension Methods
LINQ Part 5: how to use custom extension methods with query expressions. Read More
posted Monday, April 17, 2006 11:41 PM with 1 Comments

LINQ vs. XQuery
What's the difference between XQuery and LINQ? Read More
posted Friday, April 14, 2006 7:36 PM with 6 Comments

C++/CLI, Finalize and Dispose
C++/CLI has a great syntax for dealing with resources. The syntax of C++/CLI is simpler than C#. Read More
posted Monday, April 10, 2006 9:48 PM with 0 Comments

Lambda Expressions and Anonymous Methods
C# 3.0 enhances anonymous methods that are new with C# 2.0: lambda expressions. To show the concept of anonymous methods and lambda expressions let's look at this simple extension method DisplaySelected that writes selected properties to the console. Read More
posted Monday, September 26, 2005 10:09 PM with 0 Comments

Extension Methods
C# 3.0 makes it possible to add methods to existing classes that are defined in other assemblies. All the extension methods must be declared static. Extension methods are made by using the this keyword with the first parameter. Here I'm creating a Foo Read More
posted Friday, September 16, 2005 6:05 PM with 3 Comments

C++/CLI, IDisposable and Finalize
With Beta 2, C++/CLI changed the code that is generated with the destructor (~Class) and the explicit finalize (!Class). It's a great improvement! Now the Dispose(true) pattern for embedded objects is implemented with this code that just contains a destructor Read More
posted Wednesday, April 27, 2005 9:15 PM with 2 Comments

C# 2.0 and C++/CLI Event
Last week I've done an INETA sponsored talk for the .NET User Group Styria, thanks to the invitation of Klaus Aschenbrenner. The attendees have been zealous from possibilities of generics and anonymous methods. Some more information about generics Read More
posted Wednesday, April 20, 2005 9:58 AM with 2 Comments

C++/CLI: Pointer Arithmetic with Embedded Value Types
With C++/CLI it is possible to use the interior_ptr<> keyword for using pointer arithmetic with value types that are embedded in a managed class. The array keyword is used to create .NET arrays. Here the array consists of 8 int values. array<int>^ Read More
posted Tuesday, March 15, 2005 10:22 AM with 0 Comments

Predicates with .NET 2.0
In a previous blog entry I've shown the transformation of the Accumulate method from a traditional implementation to a generic implementation where the action is passed. This was the result of the last version that does something to every object in a Read More
posted Thursday, March 10, 2005 10:06 AM with 3 Comments

Generic Methods
Following my blog about Generic Delegates and Anonymous Methods, here is more: Generics and anonymous methods can make code a lot more flexible. Following I show different ways to accumulate the balance of Account objects. The Account class is a simple Read More
posted Sunday, March 06, 2005 4:16 PM with 9 Comments

Generic Delegates and Anonymous Methods
Generics and anonymous methods are great improvements of C#. Having a generic collection persons of type List<Person>, the objects of the collection can be accessed with a simple foreach statement: foreach (Person p in persons){   Console.WriteLine(p);} Read More
posted Friday, March 04, 2005 3:16 PM with 5 Comments

C++/CLI Value Types and Memory Location
With C++/CLI value types can be put on the stack, or on the native or managed heaps. value class MyData{  property int Simple;}; Declaring the variable locally, the object is put on the stack. MyData d1;d1.Simple = 11; Using the pointer syntax, Read More
posted Monday, February 28, 2005 2:05 PM with 0 Comments

Dispose and Finalize with C++/CLI, C# and VB
Depending on the .NET language more or less of implementing resource management with the interface IDisposable and the finalizer is hidden. Interestingly, with VB nothing is hidden - however all the code is created automatically with Visual Studio 2005 Read More
posted Sunday, January 23, 2005 7:26 PM with 2 Comments

C++/CLI and IDisposable
With my previous post about Instantiating Managed Objects with C++/CLI you could read about using ref types two different ways: with local variables and with a handle. Now I'm adding implementing the IDisposable interface with the Read More
posted Saturday, January 15, 2005 4:36 PM with 1 Comments

C++/CLI: Instantiating Managed Objects
C++/CLI (not Beta 1) allows declaring reference types as local variables. Let's start with this simple ref class: ref class Test{public:    void Foo()    {        Console::WriteLine("Foo");    Read More
posted Friday, January 14, 2005 8:09 AM with 2 Comments

Access Modifiers
The December version of Visual Studio 2005 / C++ now has an internal access modifier instead of using public private. This is different from my previous post. The access modifiers public protected and protected private are still the same as before: Read More
posted Monday, December 27, 2004 4:34 PM with 2 Comments

Access Modifiers: C++/CLI vs C# vs VB
C# has an internal access modifier (VB: Friend) to allow access only within the assembly. C++/CLI defines all access with the public/protected/private keywords; this allows more options:  C++ C# VB public public public Public protected Read More
posted Monday, December 20, 2004 9:05 AM with 3 Comments

Properties with C++/CLI
C++/CLI was influenced by C#, but it also has a shorter syntax for properties. This is the C# syntax of properties: private string lastname;public string Lastname{   get   {      return lastname;   Read More
posted Friday, December 17, 2004 3:52 PM with 0 Comments

Generics, Code Sharing and Partial Specialization
Joel Pobar has an interesting blog about CLR Generics and code sharing: X86 code is shared with reference types, with value types a "partial specialization" is used. Christian Read More
posted Sunday, November 21, 2004 8:21 PM with 0 Comments

C++ Decisions
With C++ we have to decide between many different classes with very similar functionality. CComVariant, _variant_t, COleVariant, VARIANT* _com_ptr_t, CComPtr, CComQIPtr, or no smart pointers CString, CAtlString, string, char* CArray, CList, vector Read More
posted Sunday, June 13, 2004 12:38 PM with 0 Comments

Interface Inheritance
Memi Lavi writes about inherits vs. implements in C#, and that the difference gets much more obvious with VB. He also talks about multiple inheritance with interfaces is not possible. Mostly I'm writing my programs with C# (sometimes C++ and VB). Now Read More
posted Sunday, May 09, 2004 8:08 AM with 4 Comments

Whidbey C# Featurette
Eric Gunersson blogs about Whidbey C# Features: C# Featurette #3: Static Classes We can use the static keyword with classes. Until now I've always used private constructors, the static keyword is better. C# Featurette #2: Inline Warning Control I hope Read More
posted Wednesday, April 14, 2004 9:59 PM with 0 Comments

C# Frequently Asked Questions
The C# team has a new blog about C# Frequently Asked Questions. In the first blog you can ask any C# question. Some FAQs are already posted: Why doesn't C# support default parameters? Why doesn't C# support multiple inheritance? Why doesn't C# have a Read More
posted Sunday, March 07, 2004 10:23 PM with 4 Comments

Properties and Fields
Martin Fowler blogs about that he liked the notion of properties from the beginning (compared to Java's getX/setX). However, he doesn't like that fields and properties are handled differently by reflection, so it is not possible to change a field to Read More
posted Thursday, February 05, 2004 11:55 AM with 9 Comments


Powered by Community Server, by Telligent Systems