Click here to Skip to main content
15,921,577 members
Home / Discussions / C#
   

C#

 
GeneralRe: Object Reference Error Pin
Bernhard Hiller26-Aug-14 21:05
Bernhard Hiller26-Aug-14 21:05 
Ehm, that's actually beginner's stuff, isn't it?
Look:
detail.GRHoldingID = detail.GetDetailID(context);
assigns the return value of the GRHoldingID function to the GRHoldingID property.
From the code snippet you showed us, we can see that GRHoldingID returns a string.
From the error message, we can conclude that the GRHoldingID property is an integer.
Since we do not have more information about that class and its business rules, we cannot provide a "correct" solution safely.
You might change the GRHoldingID property to a string, or you might try to get an integer value from the string, i.e.
C#
string strID = detail.GetDetailID(context);
int id;
if (int.TryParse(strID, out id))
{
    detail.GRHoldingID = id;
}
else
{
    // how do you want to handle this error case?
}

QuestionSpeech recogination of specific language Pin
frech8726-Aug-14 1:16
frech8726-Aug-14 1:16 
AnswerRe: Speech recogination of specific language Pin
Pete O'Hanlon26-Aug-14 1:44
mvePete O'Hanlon26-Aug-14 1:44 
GeneralRe: Speech recogination of specific language Pin
frech8726-Aug-14 1:48
frech8726-Aug-14 1:48 
GeneralRe: Speech recogination of specific language Pin
ZurdoDev26-Aug-14 1:56
professionalZurdoDev26-Aug-14 1:56 
GeneralRe: Speech recogination of specific language Pin
GuyThiebaut26-Aug-14 3:40
professionalGuyThiebaut26-Aug-14 3:40 
GeneralRe: Speech recogination of specific language Pin
Pete O'Hanlon26-Aug-14 3:55
mvePete O'Hanlon26-Aug-14 3:55 
GeneralRe: Speech recogination of specific language Pin
GuyThiebaut26-Aug-14 4:05
professionalGuyThiebaut26-Aug-14 4:05 
GeneralOT Pin
Keith Barrow26-Aug-14 4:34
professionalKeith Barrow26-Aug-14 4:34 
GeneralRe: OT Pin
Chris Quinn26-Aug-14 5:09
Chris Quinn26-Aug-14 5:09 
AnswerRe: Speech recogination of specific language Pin
Duncan Edwards Jones26-Aug-14 4:51
professionalDuncan Edwards Jones26-Aug-14 4:51 
GeneralRe: Speech recogination of specific language Pin
Pete O'Hanlon26-Aug-14 5:57
mvePete O'Hanlon26-Aug-14 5:57 
GeneralRe: Speech recogination of specific language Pin
Duncan Edwards Jones26-Aug-14 6:02
professionalDuncan Edwards Jones26-Aug-14 6:02 
GeneralRe: Speech recogination of specific language Pin
Pete O'Hanlon26-Aug-14 6:05
mvePete O'Hanlon26-Aug-14 6:05 
GeneralRe: Speech recogination of specific language Pin
Duncan Edwards Jones26-Aug-14 6:43
professionalDuncan Edwards Jones26-Aug-14 6:43 
GeneralRe: Speech recogination of specific language Pin
Pete O'Hanlon26-Aug-14 22:36
mvePete O'Hanlon26-Aug-14 22:36 
GeneralRe: Speech recogination of specific language Pin
Duncan Edwards Jones26-Aug-14 22:46
professionalDuncan Edwards Jones26-Aug-14 22:46 
AnswerRe: Speech recogination of specific language Pin
jschell26-Aug-14 10:53
jschell26-Aug-14 10:53 
QuestionMailMessage.AlternateViews ordering Pin
User 47307525-Aug-14 12:32
User 47307525-Aug-14 12:32 
AnswerRe: MailMessage.AlternateViews ordering Pin
Dave Kreskowiak25-Aug-14 14:12
mveDave Kreskowiak25-Aug-14 14:12 
GeneralRe: MailMessage.AlternateViews ordering Pin
User 47307525-Aug-14 17:07
User 47307525-Aug-14 17:07 
GeneralRe: MailMessage.AlternateViews ordering Pin
Dave Kreskowiak25-Aug-14 17:13
mveDave Kreskowiak25-Aug-14 17:13 
GeneralRe: MailMessage.AlternateViews ordering Pin
User 47307525-Aug-14 17:58
User 47307525-Aug-14 17:58 
GeneralRe: MailMessage.AlternateViews ordering Pin
Dave Kreskowiak25-Aug-14 19:05
mveDave Kreskowiak25-Aug-14 19:05 
QuestionLucene.Net Date Range Search in given indexes Pin
Amol Parsewar25-Aug-14 2:29
Amol Parsewar25-Aug-14 2:29 

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.