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

C#

 
GeneralRe: how to get programmatically the selected item of a treeview dynamically built Pin
Hervend27-Nov-17 19:19
Hervend27-Nov-17 19:19 
GeneralRe: how to get programmatically the selected item of a treeview dynamically built Pin
Gerry Schmitz27-Nov-17 8:12
mveGerry Schmitz27-Nov-17 8:12 
QuestionWorkaround for a virtual method call in the constructor Pin
CodeWraith25-Nov-17 9:40
CodeWraith25-Nov-17 9:40 
Questionissues concerning c# object reference not set to an instance of an object error Pin
Hervend24-Nov-17 2:27
Hervend24-Nov-17 2:27 
AnswerRe: issues concerning c# object reference not set to an instance of an object error Pin
Eddy Vluggen24-Nov-17 2:49
professionalEddy Vluggen24-Nov-17 2:49 
GeneralRe: issues concerning c# object reference not set to an instance of an object error Pin
Hervend24-Nov-17 3:25
Hervend24-Nov-17 3:25 
GeneralRe: issues concerning c# object reference not set to an instance of an object error Pin
Eddy Vluggen24-Nov-17 3:33
professionalEddy Vluggen24-Nov-17 3:33 
GeneralRe: issues concerning c# object reference not set to an instance of an object error Pin
Hervend24-Nov-17 4:24
Hervend24-Nov-17 4:24 
Yes, GetSetOfEqtLevel2 returns an array of eqtlevel2.
By running step by step the application in the console mode, I've pointed out that the issue comes from the eqtlevel2 items which dont have eqtlevel3 elements.

Lets consider the following example:

eqtlist: 2 items of type eqtlevel1 {eqtlevel1a and eqtlevel1b}
eqtlevel1a: 3 items of type eqtlevel2 {1a.eqtlevel2.1; 1a.eqtlevel2.2 and 1a.eqtlevel2.3}
1a.eqtlevel2.1: 1 item of type eqtlevel3 {1a.2.1.eqtlevel3}
eqtlevel1b: 1 item of type eqtlevel2 {1b.eqtlevel2.1}

In such a case the application will display the NullReference error when trying to get objects of type eqtlevel3 for 1b.eqtlevel2.1 since it hasn't any sublevel item.

Now the problem is slightly different. How I can prevent this error when reaching objects which have not sublevel items since the same method has to be applied whitout knowing in advance the content of the pointed objects?

Thank again for your availability.

RV
GeneralRe: issues concerning c# object reference not set to an instance of an object error Pin
Hervend24-Nov-17 4:35
Hervend24-Nov-17 4:35 
GeneralRe: issues concerning c# object reference not set to an instance of an object error Pin
Eddy Vluggen24-Nov-17 5:15
professionalEddy Vluggen24-Nov-17 5:15 
AnswerRe: issues concerning c# object reference not set to an instance of an object error Pin
OriginalGriff24-Nov-17 3:11
mveOriginalGriff24-Nov-17 3:11 
GeneralRe: issues concerning c# object reference not set to an instance of an object error Pin
Hervend24-Nov-17 4:34
Hervend24-Nov-17 4:34 
GeneralRe: issues concerning c# object reference not set to an instance of an object error Pin
OriginalGriff24-Nov-17 4:50
mveOriginalGriff24-Nov-17 4:50 
QuestionDisable Update of xmlns into Report Viewer C# Pin
rikidev23-Nov-17 23:37
rikidev23-Nov-17 23:37 
QuestionHow to locate a window by title Pin
Leif Simon Goodwin23-Nov-17 20:53
Leif Simon Goodwin23-Nov-17 20:53 
AnswerRe: How to locate a window by title Pin
Eddy Vluggen24-Nov-17 2:48
professionalEddy Vluggen24-Nov-17 2:48 
GeneralRe: How to locate a window by title Pin
Leif Simon Goodwin24-Nov-17 3:32
Leif Simon Goodwin24-Nov-17 3:32 
QuestionDelete only the rows that has a particular Column value using C# code Pin
Member 1245769023-Nov-17 14:43
Member 1245769023-Nov-17 14:43 
AnswerRe: Delete only the rows that has a particular Column value using C# code Pin
Eddy Vluggen24-Nov-17 2:46
professionalEddy Vluggen24-Nov-17 2:46 
QuestionHow to refresh reportviewer when SQL input data changed Pin
C Sharp coder 201823-Nov-17 14:29
C Sharp coder 201823-Nov-17 14:29 
AnswerRe: How to refresh reportviewer when SQL input data changed Pin
Eddy Vluggen24-Nov-17 2:44
professionalEddy Vluggen24-Nov-17 2:44 
GeneralRe: How to refresh reportviewer when SQL input data changed Pin
C Sharp coder 201824-Nov-17 2:56
C Sharp coder 201824-Nov-17 2:56 
GeneralRe: How to refresh reportviewer when SQL input data changed Pin
Eddy Vluggen24-Nov-17 3:06
professionalEddy Vluggen24-Nov-17 3:06 
GeneralRe: How to refresh reportviewer when SQL input data changed Pin
C Sharp coder 201824-Nov-17 3:20
C Sharp coder 201824-Nov-17 3:20 
GeneralRe: How to refresh reportviewer when SQL input data changed Pin
Eddy Vluggen24-Nov-17 3:24
professionalEddy Vluggen24-Nov-17 3:24 

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.