GIDForums  

Go Back   GIDForums > Computer Programming Forums > .NET Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 15-Jan-2009, 19:44
BioHazard90 BioHazard90 is offline
New Member
 
Join Date: Nov 2008
Posts: 2
BioHazard90 is on a distinguished road

Instantiation in C#


C-SHARP / C# Code:
class MyProgram
{
    static void Main()
    {
        int[] integers;            // declare array
        integers = new int[10];    // size array
    }
}

In which line is the array actually instantiated?
Last edited by admin : 16-Jan-2009 at 01:10. Reason: Please insert your example C# codes between [CSHARP] and [/CSHARP] tags
  #2  
Old 16-Jan-2009, 07:44
fakepoo fakepoo is offline
Regular Member
 
Join Date: Oct 2007
Posts: 761
fakepoo is a jewel in the roughfakepoo is a jewel in the roughfakepoo is a jewel in the rough

Re: Instantiation in C#


C-SHARP / C# Code:
// This line creates a variable that can point to an array. It is initially pointing to nothing and can not be dereferenced.
int[] integers;            

// This line creates an array of 10 integers and points "integers" at it. Now, "integers" can be used.
integers = new int[10];   
 
 

Recent GIDBlogVista ?Widgets? on Windows XP by LocalTech

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Smart Array problem crazy_ivan C++ Forum 5 27-Sep-2007 01:01
Linked List silicon C++ Forum 2 22-Jul-2004 03:29

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 20:23.


vBulletin, Copyright © 2000 - 2010, Jelsoft Enterprises Ltd.