Keep In mind I don't have much coding experience...
I'm having problem's accessing an Array. I'm creating the Array using a function that returns a Array here's an example:
int[] ArrayName = ReturnArray(string);
So now that ArrayName has been created it should be identical to what ReturnArray returned should it not?
Well I set a breakpoint right on :
int[] ArrayName = ReturnArray(string);
I can see that ArrayName was created properly.
Well when I try to access just 1 value of the Array like so:
print(ArrayName[0]);
It should only return the first value in the array right? well It's not! It returns a MORE THAN ONE VALUE and the value's Don't even match what ReturnArray(string) Returned
Here is the "ReturnArray" function :
public static int[] ReturnArray(string t)
{
int i,ii,;
string ba;
string base64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
List<int> list = new List<int>();
for (i = 0; i < t.Length;i++)
{
ba = t.Substring(i, 1);
ii = base64.IndexOf(ba) * 64;
list.Add(ii);
}
return list.ToArray();
}
Added more code do to response's from comments
private void outputLoop()
{
int i = 0;
for (i = 0; i < 63; i++)
{
int te = lines[i].Length - 128;
string tes = lines[i].Substring(te, 64);
int[] ArrayName = ReturnArray(tes);
_textlayer.DrawString(_font, ArrayName[i].ToString(), new Vector2(1100, i * 15), Color.White);
}
}
printfunction do? It is insanely hard to guess on behavior of code the only you can see. Consider making self contained sample (similar to what Tim Medora have in his (+1) answer). Make console project and use Console.WriteLine, add comments on what you gat and what you wxpect (instead all caps "MORE THAN ONE VALUE").