本文介绍了用变量命名结构的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是C#和结构新手所以这可能很容易或者只是没有

可能。

我有一个定义为Branch的结构

如果我使用Branch myBranch = new Branch(i); //一切正常

如果我使用Branch(myBranch + x)= new Branch(i); //它没有


x是一个循环迭代器,我是构造函数的int来定义一个

数组。


我在这里做错了什么。

I am new to C# and to structs so this could be easy or just not
possible.
I have a struct defined called Branch
If I use Branch myBranch = new Branch(i); // everything works
If I use Branch (myBranch + x) = new Branch(i); // it doesn''t

x is a loop iterator, i is an int for the constructor to define an
array.

What am I doing wrong here.

推荐答案






我很好奇 - 你为什么建议那个?


-

Lucian



I''m curious -- why did you advise that?

--
Lucian


这篇关于用变量命名结构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-27 16:07
查看更多