Hi all,
I was just wondering what people thought about this. I know its possible to write raw C++ code to create a GUI but that's pretty involved.
Its a lot easier in C# for sure.
But I created a very simple form with a text box and a menu strip in C#. When I checked the task manager, it said it's memory usage was 13k. Compared to say notepad or notepad++, that's a huge difference...
Maybe C# wasn't designed to create applications such as a notepad clone or something, I dont know... But is there any advantage to using C# for these kind of applications other than its ease of design?
I'm thinking of going back to C++ and installing GTK and going down that route but I have no idea if that would be any better lol
Any help is appreciated. Thanks a lot!

1 answers
Whenever any .NET application runs, several large dlls need to be loaded into memory. All applications require mscorlib.dll as a minimum and Windows Forms applications will need System.Windows.Forms.dll and System.Drawing.dll.
There is, of course, a huge amount of functionality in these dlls and, typically, a particular application will only use a small part of it.
However, it has to be admitted that the memory footprint of a .NET WinForm application is much greater than a C++ MFC application or a C Win32 application and that performance is not as good either.
My personal view is that this doesn't matter much on today's hardware but what does matter is being able to quickly and easily create and maintain applications which is where a .NET language such as C# excels.
I think it's fair to say that the focus of .NET is more towards application than system development. This certainly doesn't mean that it can't be used for the latter and Microsoft are currently rewriting the C# compiler in C# itself rather than C++ so they can expose its services to applications rather than it just being a 'black box'.
However, if you're writing a system utility (such as a text editor) which you want to run as quickly and with as small a memory footprint as possible, then C/C++ is clearly a better choice than C# if you can afford the extra development time.
answered one year ago by:
17279
40
Thanks a lot vulpes for your answer :) The simple text editor was just a little test application as I'm just picking up C#. What you said makes perfect sense. If I was to create a more complex application, no doubt it would be very difficult in C/C++ as opposed to C#. I guess any hit in the performance would probably be an acceptable trade off compared to the ease of development offered. I'm just worried some hardcore C++ developer would call me... a noob :P ... for using C# or something lol Thanks a lot
17279
There will always be a few hardcore C++ developers who believe that their language is the 'only game in town' but most of the guys I know have a healthy respect for C#. Now, if you were thinking of using VB.Net, then you might suffer a few jibes ;)