本文介绍了Typedef等效于.NET的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我们在.NET中有什么东西相当于C ++的Typedef。


问候,

Vasanth

Hi All,

Do we have anything in .NET which is equivalent to C++''s Typedef .

Regards,
Vasanth

推荐答案




不在VB.NET中,没有。最接近的是你可以做的事情


导入SomeAlias = SomeType


然后使用SomeAlias而不是SomeType。但与typedef相比,这是非常有限的




Mattias


-

Mattias Sj?gren [MVP] mattias @ mvps.org
|

请回复到新闻组。



Not in VB.NET, no. The closest thing is that you can do

Imports SomeAlias = SomeType

and then use SomeAlias instead of SomeType. But that''s pretty limited
compared to typedef.

Mattias

--
Mattias Sj?gren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.




不在VB.NET中,没有。最接近的是你可以做到

导入SomeAlias = SomeType

然后使用SomeAlias而不是SomeType。但与typedef相比,这相当有限。

Mattias

-
Mattias Sj?gren [MVP] mattias @ mvps.org
|
请仅回复新闻组。



Not in VB.NET, no. The closest thing is that you can do

Imports SomeAlias = SomeType

and then use SomeAlias instead of SomeType. But that''s pretty limited
compared to typedef.

Mattias

--
Mattias Sj?gren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.






出于兴趣:为什么需要它?到目前为止我既不需要typedef也不需要运算符

重载。

-

Armin


http://www.netmeister.org/news/learn2quote.html



Out of interest: Why do you need it? Neither I needed typedefs nor operator
overloading so far.
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html


这篇关于Typedef等效于.NET的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-23 15:45