问题描述
大家好
请帮助我使用C ++代码后的
的C#等效语法。非常感谢提前。
double * firstVal;
int secondVal;
double thirdVal;
int fourthVal;
firstVal = new double [secondVal];
*(firstVal + thirdVal)= fourthVal;
delete [] firstVal;
Hi all
Please help me with the C# equivalent syntax for the
following C++ code. Thanks a lot in advance.
double *firstVal;
int secondVal;
double thirdVal;
int fourthVal;
firstVal = new double[secondVal];
*(firstVal + thirdVal) = fourthVal;
delete [] firstVal;
推荐答案
转换裸语法很少是一个好主意,特别是在这种情况下
,其中不一定是等价的。相反,告诉我们你要做什么
我们可以告诉你通常使用什么成语
C#。
-
Jon Skeet - < sk *** @ pobox.com>
如果回复小组,请不要给我发邮件
Converting bare syntax is rarely a good idea, especially in thise case
where there isn''t necessarily an equivalent. Instead, tell us what
you''re trying to do and we can tell you what idiom is usually used in
C#.
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
这篇关于C#等效语法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!