IsArray java help

I have a bit of java

	var scriptName = test; 
	var scriptType = Assembly.GetCallingAssembly().GetType(scriptName); 

	MemberInfo  = scriptType.GetFields(
                BindingFlags.DeclaredOnly |
                BindingFlags.Public |
				BindingFlags.Static); 

		myData.iScript[d] = new ScriptData();
		myData.iScript[d].name = Scripts[d];
		
		myData.iScript[d].amount = MemberInfo.length;
		for(y=0;y<MemberInfo.length;y++){
		myData.iScript[d].iVar[y] = new VarData();
		print(MemberInfo[y].name);
		print(MemberInfo[y].GetValue(null));
		if(MemberInfo[y].GetType().IsArray){
		print("yes");
		}
		else{print("no");}
		myData.iScript[d].iVar[y].name =  MemberInfo[y].name;
		myData.iScript[d].iVar[y].value = MemberInfo[y].GetValue(null);

		}
	
	}

it is reading this bit of code

static var a = 54345345345345324;
static var b  = "hallo";
static var c : int[] = [5,6];
public static var d = 4.555;


function Update () {

}

but by the bit of IsArray it Always returns false evan if field C is an array

why?

demonicmetal cs

Change:

MemberInfo[y].GetType().IsArray

to

MemberInfo[y].DeclaringType.IsArray

GetType() always, always returns the type of the object you call it on. In this case, the object is a FieldInfo (it’s what exposes all the information about the field that you’re trying to access).

oke thanks but i don’t need it anymore