|
|
|
|
.NET Training, Consulting, Coaching & Development
Language
C#, C++, VB
|
|
|
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
|
|
|
|
LINQ Part 5: how to use custom extension methods with query expressions. Read More
|
|
|
|
What's the difference between XQuery and LINQ? Read More
|
|
|
|
C++/CLI has a great syntax for dealing with resources. The syntax of C++/CLI is simpler than C#. Read More
|
|
|
|
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
|
|
|
|
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
|
|
|
|
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
|
|
|
|
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
|
|
|
|
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
|
|
|
|
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
|
|
|
|
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
|
|
|
|
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
|
|
|
|
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
|
|
|
|
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
|
|
|
|
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
|
|
|
|
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
|
|
|
|
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
|
|
|
|
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
|
|
|
|
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
|
|
|
|
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
|
|
|
|
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
|
|
|
|
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
|
|
|
|
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
|
|
|
|
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
|
|
|
|
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
|
© 2002 - 2006 by thinktecture, Ingo Rammer and Christian Weyer. All rights reserved.

|
|