By knowing VC++ MFC, how easy or difficult is to learn C#.Net?
Right now, I'm more into design & maintenance of MFC based application. I'm seeing good progress and requirement f开发者_开发问答or C#.Net application.
With this background knowledge, how easy or difficult is to learn C#.Net? Is there any tutorials available online that helps MFC developers to easily learn C#.Net quickly?
Any help on this much appreciated!
C# is a native choice for C++ developer moving to .NET. It is really easy to learn C#, and you can find that Windows Forms is much better UI framework, than MFC. Windows Forms is actually one more native Windows API wrapper, based on GDI, it is designed better than MFC, and much easier to use. However, Microsoft considers Windows Forms as old technology, and promotes WPF, which is based on DirectX and not GDI. DirectX is native API for Windows Vista and later. This is first difficult decision - whether to use Windows Forms or WPF. Learning WPF is not so easy, as Windows Forms, but possibly moving directly to WPF is smart choice. For example, Visual Studio 2010 UI is written in WPF.
Apart from Syntax the move from C++ to C# isn't that difficult, getting your head around the .dotNet framework takes time, but worth the effort.
I can recommend a book by Andrew Troelsen - 'C# and the .Net Platform', I believe it is in it's 5 revision now.
You will be amazed on a daily basis how much easier it is develop Windows applications in C# than it is with MFC!
The one thing to be aware of is MFC forces more of a Model View pattern on you, which C# doesn't. It is worth spending a bit of time learning some of the patterns to develop windows cleanly. It is very easy to create spagetti code in C#!
You know MFC, so you know how to program a framework.
In my opinion, .Net framework is easier to program than MFC, you need to know two things:
C# and CLR. You need to study a new language C# and the standard libraries in .Net, like strings, etc. A good reference is CLR via C#.
Windows Forms. Windows Forms is far easier than MFC and more clean. You can find a lot of tutorials online.
精彩评论