Click here to Skip to main content
15,442,338 members
Home / Discussions / C#
   

C#

 
QuestionWorkaround for a virtual method call in the constructor Pin
CodeWraith25-Nov-17 9:40
MemberCodeWraith25-Nov-17 9:40 
Questionissues concerning c# object reference not set to an instance of an object error Pin
Hervend24-Nov-17 2:27
MemberHervend24-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
MemberHervend24-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
MemberHervend24-Nov-17 4:24 
GeneralRe: issues concerning c# object reference not set to an instance of an object error Pin
Hervend24-Nov-17 4:35
MemberHervend24-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 
Hahaha; yes, I was looking at the wrong line; it is not the line that you state that goes wrong, but the line after that;
C#
EqtLevel2[] eqtlevel2 = EqtListDataBase.GetSetOfEqtLevel2(eqtlevel1[i]);
for (int j = 0; j < eqtlevel2.Length; j++)
If your eqtlevel2 is null, then it is not possible to fetch its "Length" property. That would be the source of the nullreference-exception, and the stacktrace should reflect that.

Instead of having a check whether or not the method returns null, I'd prefer the method to return an empty array or list instead of null. That way you can enumerate it even if it is empty, without having to check if it is null or not.
Bastard Programmer from Hell Suspicious | :suss:
If you can't read my code, try converting it here[^]

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
MemberHervend24-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
Memberrikidev23-Nov-17 23:37 
QuestionHow to locate a window by title Pin
Leif Simon Goodwin23-Nov-17 20:53
MemberLeif 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
MemberLeif 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
MemberMember 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
MemberC 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
MemberC 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
MemberC 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 
GeneralRe: How to refresh reportviewer when SQL input data changed Pin
C Sharp coder 201824-Nov-17 3:39
MemberC Sharp coder 201824-Nov-17 3:39 
GeneralRe: How to refresh reportviewer when SQL input data changed Pin
Eddy Vluggen24-Nov-17 3:42
professionalEddy Vluggen24-Nov-17 3:42 

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.