Link to home
Start Free TrialLog in
Avatar of computerstreber
computerstreberFlag for United States of America

asked on

Question About Filling C# Array

I have an application that will automatically generate a password between the lengths of 22 and 24. I need to generate two passwords. I started off by just generating them and then writing them to the console. However, I would like to save them to an array. However, the current code I have is not working. I get the following error at run time:

Array creation must have array size or array initializer.
using System;
using System.Collections.Generic;
using System.IO;
using System.Security.Cryptography;
using System.Text;
 
public class Entry
{
    [STAThread]
    static void Main(string[] args)
    {
        string[][] SqlPasswords = new string[][];
 
        for (int i = 0; i < 2; i++)
            GeneratePassword.Generate(22,24).ToString();
            //Console.WriteLine(GeneratePassword.Generate(22, 24));
 
        Console.ReadLine();
    }
}

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of computerstreber
computerstreber
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial