求高手帮助

问题描述

usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;namespaceConsoleApplication1{classNumber{publicint[]number;publicNumber(int[]number){this.number=number;}}classOtherNumber{publicNumber[]number;publicOtherNumber(Number[]number){this.number=number;}}classProgram{staticvoidMain(string[]args){Number[]numbers=newNumber[2];numbers[0]=newNumber(newint[]{1,2});numbers[1]=newNumber(newint[]{3,4});OtherNumberother=newOtherNumber(numbers);}}}OtherNumberother=newOtherNumber(numbers);是不是OtherNumber类中的number为{1,2,3,4}????

解决方案

解决方案二:
OtherNumber类实例中的number成员是Number[]类型的,所以不能认为是{1,2,3,4}。other.number[0].number是{1,2}other.number[1].number是{3,4}
解决方案三:
引用楼主的回复:

usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;namespaceConsoleApplication1{classNumber{publicint[]number;publicNumb……

OtherNumber类有一个Number类型的成员Number[]numbers=newNumber[2];//这两个对象是独立的numbers[0]=newNumber(newint[]{1,2});numbers[1]=newNumber(newint[]{3,4});因此你说的numbers[0]numbers[1]没什么关系,你说的结论不成立
解决方案四:
引用2楼的回复:

引用楼主的回复:usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;namespaceConsoleApplication1{classNumber{publicint[]number;publicNumb……OtherNu……

能说的详细点吗谢谢了

时间: 2024-08-30 20:38:32

求高手帮助的相关文章

android开发-求高手解答安卓软件兼容性的一个问题

问题描述 求高手解答安卓软件兼容性的一个问题 安卓新手一枚,在2.2的试验机上做了个仿qq程序,今天拿了部4.0试了下,很多控件没有反应,甚至有的操作还会报错,不知道是为什么,我在建立这个项目时按照默认的配置配的,求解......

递归-一个比较复杂的级联删除问题 ,求高手指点

问题描述 一个比较复杂的级联删除问题 ,求高手指点 是这样的,现在要做一个通用的删除方法.删除一个配置项和其关联配置项,逻辑很复杂.首先,数据库结构大概是这样的:有N个配置项,每个配置项有一张表,每个配置项通过一个中间表和其他配置项关联.有一对一,也有一对多的.所谓配置项一般都是一种设备,有序列号CI,ROWID来区分标识,每个设备有唯一的CI,但ROWID不唯一,ROWID是递增的,用HISTORY字段来区分是否在用.新增一个设备时是新生成一个CIROWID,HISTORY为1,表示在用.而更

w8 w7 y400-联想Y400怎么把W8改为W7,求高手支招~~~~

问题描述 联想Y400怎么把W8改为W7,求高手支招~~~~ 新入手一台联想Y400笔记本,做w8系统64位兼容很差,所以想把系统改为W7 64位的,现在此电脑和系统好像是绑定在一起的.不知道怎么解除,求高手支招怎么改系统.小学语文三体育老师教的,表达不好见谅~

ios-小女子求高手帮忙绘制一个自定义图表

问题描述 小女子求高手帮忙绘制一个自定义图表 小女子刚开始ios编程不久,如今有个画图表的需求,不知道该怎么实现,求高手帮帮忙,下面是需求图C804A51F-3878-4D66-9C49-EF996F790E23.png 解决方案 图都看不见. 刚开始,谁都一样,多练习多查资料,慢慢就会了,一步步来. 先自己想,先把思路列出来,不会的再查,主要是要想弄明白需求是什么,弄不明白,其他的就是会了,在遇到问题,你也想不明白. 这是我的观点,我也是刚学习IOS编程不久,经常蒙圈.多练多敲多想多查就好了.

编程-Yahoo UI(引用)问题,求高手指教!

问题描述 Yahoo UI(引用)问题,求高手指教! http://img.my.csdn.net/uploads/201309/02/1378129656_3660.jpg <!DOCTYPE html> new document <!--引入一个yui3的种子文件--> .hello{ background-color:red } <script type="text/javascript" src="http://yui.yahooapis

VC++的win32小程序内存泄漏,求高手解答

问题描述 VC++的win32小程序内存泄漏,求高手解答 做的一个简单的交通模拟小程序,用三个定时器分别产生 汽车处理消息,红绿灯更换消息和汽车随机产生消息.但是最后程序内存越跑越大.求高手解答.http://download.csdn.net/detail/hdwbdbsm/6724747这个是程序的下载地址,求高手.

求高手解答:出现警告标语: 从“double”到“float”截断。

问题描述 求高手解答:出现警告标语: 从"double"到"float"截断. 我都是用float定义的,为什么程序编译时会说从double到float截断.代码如下 #includeusing namespace std;//#define float double class po{public: po(float x=0float y=0); void setpo(floatfloat); float getx()const{return x;} float

求高手解决:0xC0000005: 写入位置 0x00000064 时发生访问冲突

问题描述 求高手解决:0xC0000005: 写入位置 0x00000064 时发生访问冲突 typedef int (_stdcall*FUNA)(unsigned short Codechar* lpDataint lpDatalen);typedef int (_stdcall*FUNB)(char *lpBuf); const char * GetProtocol = ""GetProtocolData"";const char * GetReport =

php iis mysql-用PHP实现excel数据导入数据库,但是提示500错误,服务器是IIS,求高手指点

问题描述 用PHP实现excel数据导入数据库,但是提示500错误,服务器是IIS,求高手指点 require_once ('PHPExcel.php');require_once ('PHPExcel/IOFactory.php');require_once ('PHPExcel/Reader/Excel5.php');if($_POST['leadExcel'] == ""true""){ $filename = $_FILES['inputExcel']['n

模板-求ireprot导致系统挂掉服务器内存溢出求高手指点

问题描述 求ireprot导致系统挂掉服务器内存溢出求高手指点 我用的ireport 制作的pdf模板最近在系统中时不时出现因为某个jasper文件导致系统挂掉,服务器内存被调用这个文件的一个进程占用完了但是再次在系统中打印预览这个文件又正常了.不存在数据量大的问题,求各位高手指点下可能是什么原因导致的!!