Hi all,
I wanna clarify a trivial but unfound one on google that is the args in :
public static void main(string []args) a multidimensional or a simple 1-D array?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Sep 14, 2014, 2:01 PM
So the second set of square brackets here is the indexer of the string element, not the second dimension of a 2-D 'jagged' array.
Javed IqbalPosted Sep 14, 2014, 1:54 PM
for (int i = 1; i < args.Length; i++)
{
for (int j =1; j < args[i].Length; j++)
{
if (args[0] == "encode") {
Console.Write((char)(args[i][j] + 1));
}
else
{...............}
This is giving me desired output as it uses 2-D form
VulpesPosted Sep 14, 2014, 1:22 PM