简体   繁体   中英

C++ and .net, open source samples, and learning

Hi I have worked on embedded projects in c and c++ for a couple of years, never really had much of a chance to work on .net. Now can some explain to me how can i learn .Net , how long do you think it would take me to learn .Net? I look online and it seems scary, Im not even that good at c++, now there is this .net to learn. jesus.

now the other thing is i looked at some sample code for vc++ 2010 and there is:

int main()
{
    Application::Run(gcnew BDayPicker::BDayPicker());
    return 0;
}

what is gcnew? whats application?

and

#using <mscorlib.dll>

whats this #using,

this is what I mean i never seen these things now its like learning from hello world again... wtf?

oh yea whats the difference between vc++ and c++ with .net?

No one will really be able to tell you how long it will take you to learn .NET. Like others have mentioned, the best approach for C++ familiar developers wanting to get into .NET programming is to pick up C# and start using it. If you can easily make a C++ application today, and you throw yourself into it, you can probably easily make a C# application tomorrow with the caveat that you'll be looking a lot up online on MSDN or various software development community sites.

gcnew is the "garbage collection" form of the new operator. In C++, you can allocate an object that you have to do the memory cleanup on with the new operator, or you can use gcnew which will clean up for you. So if you use gcnew, you don't have to delete or free the memory.

Application is a .NET object. In the code you posted, the real work would be filling out the BDayPicker class with the desired functionality. Application::Run(gcnew BDayPicker::BDayPicker()) is just what the framework does to run that class. For more information, see link MSDN Help on Application::Run .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM