为了账号安全,请及时绑定邮箱和手机立即绑定

array.indexof

array.indexof

C#
慕粉3662187 2016-08-04 11:23:55
先谢谢各位大神了 nt[] grade = new int[] { 90, 65, 88, 70, 46, 81, 100, 68 };            int a = array.indexof(grade,90);、报错当前上下文不存在名称“array”是因为少了命名空间吗,如果是少了哪个using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Collections;
查看完整描述

2 回答

已采纳
?
慕粉3769977

TA贡献16条经验 获得超7个赞

你这是c#的代码吗?c#的话,需要using System; c#中类首字母都会大写。Array.IndexOf(grade,90)

查看完整回答
反对 回复 2016-08-05
  • 慕粉3662187
    慕粉3662187
    using System我有写啊,下面那些命名空间都在代码里用了,但还是报错了,是少引用了哪个吗
  • 慕粉3662187
    慕粉3662187
    哦哦哦我明白你的意思了
?
bigmathbase

TA贡献4条经验 获得超5个赞


命名空间跟using没有关系,需要一个namespace。

查看完整回答
反对 回复 2016-08-04
  • 2 回答
  • 0 关注
  • 1564 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信