Click here to Skip to main content
15,885,366 members
Home / Discussions / C#
   

C#

 
Questionmake mouse disable, how that user could not be able to use it. Pin
Fred 346-Oct-10 23:36
Fred 346-Oct-10 23:36 
AnswerRe: make mouse disable, how that user could not be able to use it. Pin
Eddy Vluggen7-Oct-10 1:01
professionalEddy Vluggen7-Oct-10 1:01 
AnswerRe: make mouse disable, how that user could not be able to use it. Pin
Rhuros7-Oct-10 1:35
professionalRhuros7-Oct-10 1:35 
AnswerRe: make mouse disable, how that user could not be able to use it. Pin
S Houghtelin7-Oct-10 5:52
professionalS Houghtelin7-Oct-10 5:52 
GeneralRe: make mouse disable, how that user could not be able to use it. Pin
PIEBALDconsult9-Oct-10 4:27
mvePIEBALDconsult9-Oct-10 4:27 
GeneralRe: make mouse disable, how that user could not be able to use it. Pin
S Houghtelin12-Oct-10 3:09
professionalS Houghtelin12-Oct-10 3:09 
QuestionList inside a struct Pin
Islorvat6-Oct-10 22:45
Islorvat6-Oct-10 22:45 
AnswerRe: List inside a struct Pin
J4amieC6-Oct-10 22:57
J4amieC6-Oct-10 22:57 
You've not instantiated the List anywhere. This has nothing to do with it being inside a struct - the same would have happened if your list was inside a class.

You can fix this by first creating the List.

testStruct aTestStruct = new testStruct();
aTestStruct.sList = new List<string>();
aTestStruct.sList.Add("test");


However, a few pointers

0.1) Naming convention for C# would instruct that your property is called List instead of sList.
0.2) Be careful using structs, they have some hard to understand facets - if in doubt use a class.
0.3) Strictly speaking, a List should generally not be exposed by a public property. Consider whether the struct/class should instead expose just the interface, such as an Add method to add to an internal List.
AnswerRe: List inside a struct Pin
DaveyM697-Oct-10 0:11
professionalDaveyM697-Oct-10 0:11 
GeneralRe: List inside a struct Pin
harold aptroot7-Oct-10 0:39
harold aptroot7-Oct-10 0:39 
GeneralRe: List inside a struct Pin
DaveyM697-Oct-10 7:02
professionalDaveyM697-Oct-10 7:02 
GeneralRe: List inside a struct Pin
harold aptroot7-Oct-10 7:05
harold aptroot7-Oct-10 7:05 
GeneralRe: List inside a struct Pin
DaveyM697-Oct-10 7:14
professionalDaveyM697-Oct-10 7:14 
QuestionApplication Fauled to Initialize (0xc000007b) Pin
Enobong Adahada6-Oct-10 22:12
Enobong Adahada6-Oct-10 22:12 
AnswerRe: Application Fauled to Initialize (0xc000007b) Pin
Sauro Viti6-Oct-10 22:26
professionalSauro Viti6-Oct-10 22:26 
GeneralRe: Application Fauled to Initialize (0xc000007b) Pin
Enobong Adahada7-Oct-10 3:12
Enobong Adahada7-Oct-10 3:12 
AnswerRe: Application Fauled to Initialize (0xc000007b) Pin
Luc Pattyn7-Oct-10 3:25
sitebuilderLuc Pattyn7-Oct-10 3:25 
GeneralRe: Application Fauled to Initialize (0xc000007b) Pin
Enobong Adahada7-Oct-10 3:53
Enobong Adahada7-Oct-10 3:53 
GeneralRe: Application Fauled to Initialize (0xc000007b) Pin
Enobong Adahada7-Oct-10 4:34
Enobong Adahada7-Oct-10 4:34 
JokeRe: Application Fauled to Initialize (0xc000007b) Pin
Sauro Viti7-Oct-10 22:35
professionalSauro Viti7-Oct-10 22:35 
QuestionServer side validation Pin
janani136-Oct-10 20:44
janani136-Oct-10 20:44 
AnswerRe: Server side validation Pin
rah_sin6-Oct-10 21:24
professionalrah_sin6-Oct-10 21:24 
GeneralCommunication with DCOM Server Pin
loic.ploumen6-Oct-10 6:50
loic.ploumen6-Oct-10 6:50 
GeneralRe: Communication with DCOM Server Pin
loic.ploumen7-Oct-10 3:01
loic.ploumen7-Oct-10 3:01 
Questioncontrol the way of opening a .cs file. Pin
prasadbuddhika6-Oct-10 5:18
prasadbuddhika6-Oct-10 5:18 

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.