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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
VulpesRank #55 · 29.2K reputationPosted Sep 14, 2014, 10:01 AM EDT
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.
VulpesRank #55 · 29.2K reputationPosted Sep 14, 2014, 9:22 AM EDT
Javed Iqbal15 reputationPosted Sep 14, 2014, 9:54 AM EDT
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