|
A Great Resource For .NET Training |
|
|
By gmon on
7/28/2007 1:51 PM
|
|
|
I just wanted to share a great resource for learning .NET programming. It's a site called Learn Visual Studio .NET. They offer great little videos that teach you aspects of programming in .NET. After entering the workplace, most of my learning is self taught -- I would either read books or look up how to do something from doing a Google search.
But sometimes I miss the classic "school way" of learning -- where you would listen to a lecturer as he/she explains a concept or show you how to do something. These videos are just like sitting in a classroom where a lecturer explains concepts and shows you how to do something by working on a computer that is displayed on an overhead projector. The presentation of the material is great and I find myself learning the material more quickly than if I had read about it on a website. You have to pay to ac ...
|
 |
|
|
More...
|
|
|
Managed Wrappers |
|
|
By gmon on
6/17/2007 7:10 AM
|
|
|
Let’s recap what we know about interoperating with legacy code from .NET. We basically have two methods.
If the legacy code is in the form of a DLL, we can use P/Invoke from any .NET language. We can also use C++ Interop if we are using C++/CLI to access this DLL.
If the legacy code is in the form of a C/C++ source file, then we can use C++ Interop to access it.
No matter which method we choose to interoperate with legacy code, we should consider wrapping up our work into a package that will be useable from any of the .NET languages. This technique involves creating a managed wrapper that acts as a proxy for the legacy native code.
Once this is done, the legacy code will then be available to any other .NET language as a .NET class. So, we tradeoff some more work in the beginning for less work further down the line.
For example, suppose our legacy code is already in the form o ...
|
 |
|
|
More...
|
|
|
Value Types, Reference Types, Boxing and Unboxing |
|
|
By gmon on
6/8/2007 2:13 AM
|
|
|
|
Most
of the .NET literature I've come across reads somewhat easily because
it is so similar to Java and I had already taken several Java
classes.
But
one of the things that I find confusing in the .NET literature is
their talk of boxing and unboxing and their emphasis on Value Types
and Reference Types. I couldn't remember
a similar topic in Java. What I do remember from Java was that ...
|
 |
|
|
More...
|
|
|
Using C++ Interop to access Legacy code |
|
|
By gmon on
6/2/2007 11:42 PM
|
|
|
|
C++
Interop, also known as “It Just Works”, is only available if you
are using C++/CLI. It is my preferred way of accessing legacy C/C++
code. The basic idea is that things should work as they have always
worked before .NET came along. In other words, if you want to access
functions within a DLL from C++/CLI, you perform the same steps as if
you were using Visual C++ 6.0.
To
illustrate how this is done, suppose you have access to a legacy
library packaged in a DLL called MathDLL.dll. This is the same
library that I used earlier to illustrate how to use P/Invoke to
access functions in a DLL.
Now
suppose you use Visual Studio 2005 to create a ne ...
|
 |
|
|
More...
|
|
|
Accessing Legacy Code with P/Invoke |
|
|
By gmon on
5/19/2007 6:21 PM
|
|
|
|
In 2002, Microsoft introduced a new programming framework called the .NET Framework. Programs written in any .NET language are compiled to an intermediate code called the Microsoft Intermediate Language (MSIL) and this intermediate code is run on top of something called the Common Language Runtime (CLR). The .NET Framework also includes a large set of prewritten classes called the Framework Class Library.
The Microsoft Intermediate Language, C ...
|
 |
|
|
More...
|
|