I need help solve Cannot implicitly convert type 'uint' to 'int'. An implicit conversion exists(are you missing a cast?)
The following line of code is working fine, however a during code review, I was asked to replace this line of code with a different one. The new line suggested is not working because I am getting the above error.
How to I make this new line of code work?
Here is the line that is working
objPrepHearDoc.Hearing.HearingKey = Convert.ToInt32(aobjXmlInputDoc.DocumentElement.SelectSingleNode("Case/Hearing[@ID=" + strEventId + "]/@ID").InnerText);
Here is the suggested code change that is not working and generating cannot implicitly convert type 'uint' to 'int'. An implicit conversion exists(are you missing a cast?)
objPrepHearDoc.Hearing.HearingKey = Convert.ToUInt32(strEventId);