Click here to Skip to main content
       

.NET Framework

 
AnswerRe: User password encryption in .Net Framework 4.5 PinmvpEddy Vluggen6-Jan-13 22:15 
QuestionBuild Output Question PinmemberKevin Marois4-Jan-13 6:32 
AnswerRe: Build Output Question PinmvpRichard MacCutchan4-Jan-13 7:13 
GeneralRe: Build Output Question PinmemberKevin Marois4-Jan-13 7:20 
GeneralRe: Build Output Question PinmvpRichard MacCutchan4-Jan-13 7:58 
AnswerRe: Build Output Question PinmvpAbhinav S4-Jan-13 7:20 
AnswerRe: Build Output Question PinmvpSandeep Mewara4-Jan-13 7:28 
QuestionNullable(Of Decimal) type variable is throwing exception "Nullable object must have a value." Pinmemberindian14327-Dec-12 19:14 
Hi All,
 
I am getting following error when I am trying to assign a null value or nuthing value to a variable of type Nullable(Of Decimal).
 
But for that variable I want to assign a decimal value or null value. The same kind of problem I faced with Nullable (of DateTime) too. It cant take a nothing assigned to it. If it cant take that value then why is it nullable(of Decimal) or Nullable (of DateTime) and System.Nullable(Of Integer) is also not taking null values (means nothing value in VB.Net).
 
Please help me in resolving this issue.
 
thanks in advance.
 
Below is my code: I tried by just putting variable=nothing also but didnt work.
 
 If savRequestData.PropRequestWage IsNot Nothing Then
                                wagesegment = New List(Of ReqWage)
                                For Each temp In savRequestData.PropRequestWage
                                    Dim wage As New ReqWage
                                    wage.DailyWage = IIf(Not String.IsNullOrEmpty(temp.DailyWage), IIf(Decimal.TryParse(temp.DailyWage, tempDecimal), tempDecimal, CType(Nothing, System.Nullable(Of Decimal))), CType(Nothing, System.Nullable(Of Decimal)))
                                    wage.RequestId = request_Id
                                    wage.WorkDate = temp.WorkDate
                                    wage.WorkHours = IIf(Not String.IsNullOrEmpty(temp.WorkHours), IIf(Decimal.TryParse(temp.WorkHours, tempDecimal), tempDecimal, CType(Nothing, System.Nullable(Of Decimal))), CType(Nothing, System.Nullable(Of Decimal)))
                                    wagesegment.Add(wage)
                                    requestedamount += IIf(temp.DailyWage IsNot Nothing, temp.DailyWage, 0)
                                Next
                             End If
Thanks & Regards,
 
Abdul Aleem Mohammad
St Louis MO - USA

AnswerRe: Nullable(Of Decimal) type variable is throwing exception "Nullable object must have a value." PinmemberEddy Vluggen28-Dec-12 9:41 
QuestionC# statement var indirect val [modified] Pinmembercodejuggler927-Dec-12 7:33 
AnswerRe: C# statement var indirect val PinmvpDave Kreskowiak27-Dec-12 8:23 
GeneralRe: C# statement var indirect val Pinmembercodejuggler927-Dec-12 8:58 
GeneralRe: C# statement var indirect val PinmvpDave Kreskowiak27-Dec-12 9:47 
QuestionNeeded: PGP source code PinmemberGregory.Gadow26-Dec-12 6:30 
AnswerRe: Needed: PGP source code PinmemberGregory.Gadow26-Dec-12 6:35 
QuestionPrivate byte is being increased continuously without any request Pinmembernishantenet23-Dec-12 21:14 
AnswerRe: Private byte is being increased continuously without any request PinmvpDave Kreskowiak24-Dec-12 6:10 
AnswerRe: Private byte is being increased continuously without any request Pinmemberjschell24-Dec-12 8:57 
QuestionMSI not taking/Installing .NET framework Pinmembersjs4u19-Dec-12 18:25 
AnswerRe: MSI not taking/Installing .NET framework PinmvpDave Kreskowiak19-Dec-12 19:55 
QuestionEntity Framework is Updating other column also Pinmemberindian14319-Dec-12 16:51 
QuestionUnable to start program http://localhost:1837/default.aspx using VS 2008 in Windows XP IE 8 [modified] Pinmembersr15919-Dec-12 0:26 
SuggestionRe: Unable to start program http://localhost:1837/default.aspx using VS 2008 in Windows XP IE 8 PinmvpRichard MacCutchan19-Dec-12 0:52 
QuestionCustomer Hacking System Time PinmemberKlockness18-Dec-12 5:33 
AnswerRe: Customer Hacking System Time PinmvpRichard MacCutchan18-Dec-12 7:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web04 | 2.8.1411023.1 | Last Updated 26 Nov 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid