[英]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. 嗨,我从事c和c ++的嵌入式项目已有两年了,从来没有真正有太多的机会在.net上工作。 Now can some explain to me how can i learn .Net , how long do you think it would take me to learn .Net?
现在可以向我解释如何学习.Net了,您认为学习.Net需要多长时间? I look online and it seems scary, Im not even that good at c++, now there is this .net to learn.
我在网上看,似乎很害怕,我什至不擅长c ++,现在有这个.net可以学习。 jesus.
耶稣。
now the other thing is i looked at some sample code for vc++ 2010 and there is: 现在,另一件事是我查看了vc ++ 2010的一些示例代码,并且有:
int main()
{
Application::Run(gcnew BDayPicker::BDayPicker());
return 0;
}
what is gcnew? 什么是gcnew? whats application?
有什么用途?
and 和
#using <mscorlib.dll>
whats this #using, 这是什么#using
this is what I mean i never seen these things now its like learning from hello world again... wtf? 这就是我的意思,我现在再也没有见过这些东西,就像再次向世界问好... wtf?
oh yea whats the difference between vc++ and c++ with .net? 哦,是的。带有.net的vc ++和c ++有什么区别?
No one will really be able to tell you how long it will take you to learn .NET. 没有人真正能够告诉您学习.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.
就像其他人提到的那样,对于熟悉C ++的开发人员来说,想要进入.NET编程的最佳方法是选择C#并开始使用它。 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.
如果您今天可以轻松地制作C ++应用程序并投入使用,那么明天就可以轻松地制作C#应用程序,但需要注意的是,您将在MSDN或各种软件开发社区站点上在线查询大量内容。
gcnew is the "garbage collection" form of the new operator. gcnew是new运算符的“垃圾回收”形式。 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.
在C ++中,您可以分配一个必须使用new运算符进行内存清理的对象,也可以使用gcnew来为您清理。 So if you use gcnew, you don't have to delete or free the memory.
因此,如果您使用gcnew,则不必删除或释放内存。
Application is a .NET object. 应用程序是一个.NET对象。 In the code you posted, the real work would be filling out the BDayPicker class with the desired functionality.
在您发布的代码中,真正的工作将是使用所需的功能填充BDayPicker类。
Application::Run(gcnew BDayPicker::BDayPicker())
is just what the framework does to run that class. Application::Run(gcnew BDayPicker::BDayPicker())
就是框架用来运行该类的工作。 For more information, see link MSDN Help on Application::Run . 有关更多信息,请参见Application :: Run上的MSDN帮助链接 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.