Click here to Skip to main content
15,899,314 members
Home / Discussions / C#
   

C#

 
GeneralRe: Array iteration using unsafe code Pin
Member 26118827-Feb-04 2:55
Member 26118827-Feb-04 2:55 
GeneralRe: Array iteration using unsafe code Pin
Heath Stewart27-Feb-04 3:34
protectorHeath Stewart27-Feb-04 3:34 
GeneralRe: Array iteration using unsafe code Pin
scadaguy27-Feb-04 3:07
scadaguy27-Feb-04 3:07 
GeneralRe: Array iteration using unsafe code Pin
turbochimp27-Feb-04 4:01
turbochimp27-Feb-04 4:01 
GeneralArray of Interfaces Pin
Meysam Mahfouzi26-Feb-04 18:07
Meysam Mahfouzi26-Feb-04 18:07 
GeneralRe: Array of Interfaces Pin
Corinna John26-Feb-04 21:06
Corinna John26-Feb-04 21:06 
GeneralRe: Array of Interfaces Pin
Member 26118827-Feb-04 2:42
Member 26118827-Feb-04 2:42 
GeneralRe: Array of Interfaces Pin
Heath Stewart27-Feb-04 3:29
protectorHeath Stewart27-Feb-04 3:29 
Interfaces are reference types, hence the array is filled with null. Try to call methods on any of those array elements (before initialization) and you'll get a NullReferenceException or ArgumentNullException depending on how you use the array elements. Step through in a debugger and you'll find that they're null as well. Structs and other value types - on the other hand, do not require instantiation in an array and their members will be the default values for whatever Types they are (reference types will still be null since you can't provide a default constructor with structs, but an Int32 will be 0, etc.).

 

Microsoft MVP, Visual C#
My Articles
GeneralRe: Array of Interfaces Pin
Werdna27-Feb-04 5:26
Werdna27-Feb-04 5:26 
Generaldatagrid to windows form Pin
ASGill26-Feb-04 17:27
ASGill26-Feb-04 17:27 
GeneralRe: datagrid to windows form Pin
Mazdak26-Feb-04 21:15
Mazdak26-Feb-04 21:15 
GeneralRe: datagrid to windows form Pin
ASGill28-Feb-04 15:38
ASGill28-Feb-04 15:38 
GeneralRe: datagrid to windows form Pin
Mazdak28-Feb-04 21:42
Mazdak28-Feb-04 21:42 
GeneralContext Menu Events Pin
BigBlob20226-Feb-04 16:53
BigBlob20226-Feb-04 16:53 
GeneralRe: Context Menu Events Pin
Nick Parker26-Feb-04 17:42
protectorNick Parker26-Feb-04 17:42 
GeneralRe: Context Menu Events Pin
BigBlob20226-Feb-04 18:02
BigBlob20226-Feb-04 18:02 
GeneralRe: Context Menu Events Pin
Nick Parker26-Feb-04 18:32
protectorNick Parker26-Feb-04 18:32 
GeneralRe: Context Menu Events Pin
BigBlob20227-Feb-04 7:49
BigBlob20227-Feb-04 7:49 
QuestionHow to gain access to a network share? Pin
Throckmorton26-Feb-04 14:44
Throckmorton26-Feb-04 14:44 
AnswerRe: How to gain access to a network share? Pin
Verdant12326-Feb-04 16:37
Verdant12326-Feb-04 16:37 
AnswerRe: How to gain access to a network share? Pin
Heath Stewart27-Feb-04 3:23
protectorHeath Stewart27-Feb-04 3:23 
QuestionHow to start a process within the current command window? Pin
Throckmorton26-Feb-04 13:59
Throckmorton26-Feb-04 13:59 
AnswerRe: How to start a process within the current command window? Pin
Throckmorton26-Feb-04 14:08
Throckmorton26-Feb-04 14:08 
QuestionDataGrid - navigation to parent table? Pin
Radoslav Bielik26-Feb-04 10:48
Radoslav Bielik26-Feb-04 10:48 
AnswerRe: DataGrid - navigation to parent table? Pin
Heath Stewart26-Feb-04 12:39
protectorHeath Stewart26-Feb-04 12:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.