如何将int输入分配给int数组 [英] how to assign int input into an int array

查看:131
本文介绍了如何将int输入分配给int数组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

实际上我想将输入值存储到一个int数组中,但是我遇到了无法隐式转换int值int数组的错误
遗忘的是使用过的代码

actually i wanted to store input value into an int array, but i am getting error that cannot implicitly convert int value int array
fallowing is code what have used

int[][] newvalue = new int[3][];
         Console.WriteLine("enter new value ");
         newvalue = Console.Read();



请帮帮我



please help me out

推荐答案

尝试
newvalue[0][0] = Console.Read();



您需要定义要定义新值的数组元素.



You need to define the array elemnt that you want to define the new value to.


这篇关于如何将int输入分配给int数组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆