Results 1 to 4 of 4

Thread: What's happening in this line of code?[resolved]

  1. #1

    Thread Starter
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Resolved What's happening in this line of code?[resolved]

    Code:
    					obj_Parameters = new Object[paramCount];
    I'm trying to convert to VB.NET, and there's no way that Object, when instantiated, takes any arguments for its Sub new.
    Last edited by mendhak; Sep 28th, 2004 at 06:25 AM.

  2. #2
    Fanatic Member brown monkey's Avatar
    Join Date
    Jun 2004
    Location
    Cebu
    Posts
    552
    That I think is renewing the size of the array Object. Just my thought though, I'm not quiet sure.
    VB Code:
    1. Dim o() As Object
    2.     Sub f()
    3.         ReDim o(12)
    4.     End Sub

    edit: sample code
    Code:
            Button[] b;
            private void Form1_Load(object sender, System.EventArgs e)
            {
                b=new Button[12];
                int y=10;
                for(int i=0;i<b.Length;i++)
                {
                    b[i]=new Button();
                    b[i].Text="Button"+(i+1).ToString();
                    b[i].Location=new Point(10,y);
                    y+=21;
                    this.Controls.Add(b[i]);
                }
            }
    hope this helps.
    Last edited by brown monkey; Sep 28th, 2004 at 03:16 AM.

  3. #3

    Thread Starter
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    Perfect, thanks a lot.

    C# is a little confusing.

  4. #4
    Fanatic Member brown monkey's Avatar
    Join Date
    Jun 2004
    Location
    Cebu
    Posts
    552
    i'ts a single fret higher than C.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width