Click here to Skip to main content
15,889,281 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: User password encryption in .Net Framework 4.5 Pin
Eddy Vluggen6-Jan-13 21:15
professionalEddy Vluggen6-Jan-13 21:15 
QuestionBuild Output Question Pin
Kevin Marois4-Jan-13 5:32
professionalKevin Marois4-Jan-13 5:32 
AnswerRe: Build Output Question Pin
Richard MacCutchan4-Jan-13 6:13
mveRichard MacCutchan4-Jan-13 6:13 
GeneralRe: Build Output Question Pin
Kevin Marois4-Jan-13 6:20
professionalKevin Marois4-Jan-13 6:20 
GeneralRe: Build Output Question Pin
Richard MacCutchan4-Jan-13 6:58
mveRichard MacCutchan4-Jan-13 6:58 
AnswerRe: Build Output Question Pin
Abhinav S4-Jan-13 6:20
Abhinav S4-Jan-13 6:20 
AnswerRe: Build Output Question Pin
Sandeep Mewara4-Jan-13 6:28
mveSandeep Mewara4-Jan-13 6:28 
QuestionNullable(Of Decimal) type variable is throwing exception "Nullable object must have a value." Pin
indian14327-Dec-12 18:14
indian14327-Dec-12 18: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." Pin
Eddy Vluggen28-Dec-12 8:41
professionalEddy Vluggen28-Dec-12 8:41 
QuestionC# statement var indirect val Pin
codejuggler927-Dec-12 6:33
codejuggler927-Dec-12 6:33 
AnswerRe: C# statement var indirect val Pin
Dave Kreskowiak27-Dec-12 7:23
mveDave Kreskowiak27-Dec-12 7:23 
GeneralRe: C# statement var indirect val Pin
codejuggler927-Dec-12 7:58
codejuggler927-Dec-12 7:58 
GeneralRe: C# statement var indirect val Pin
Dave Kreskowiak27-Dec-12 8:47
mveDave Kreskowiak27-Dec-12 8:47 
QuestionNeeded: PGP source code Pin
Gregory Gadow26-Dec-12 5:30
Gregory Gadow26-Dec-12 5:30 
AnswerRe: Needed: PGP source code Pin
Gregory Gadow26-Dec-12 5:35
Gregory Gadow26-Dec-12 5:35 
QuestionPrivate byte is being increased continuously without any request Pin
nishantenet23-Dec-12 20:14
nishantenet23-Dec-12 20:14 
AnswerRe: Private byte is being increased continuously without any request Pin
Dave Kreskowiak24-Dec-12 5:10
mveDave Kreskowiak24-Dec-12 5:10 
AnswerRe: Private byte is being increased continuously without any request Pin
jschell24-Dec-12 7:57
jschell24-Dec-12 7:57 
QuestionMSI not taking/Installing .NET framework Pin
sjs4u19-Dec-12 17:25
sjs4u19-Dec-12 17:25 
AnswerRe: MSI not taking/Installing .NET framework Pin
Dave Kreskowiak19-Dec-12 18:55
mveDave Kreskowiak19-Dec-12 18:55 
QuestionEntity Framework is Updating other column also Pin
indian14319-Dec-12 15:51
indian14319-Dec-12 15:51 
QuestionUnable to start program http://localhost:1837/default.aspx using VS 2008 in Windows XP IE 8 Pin
sr15918-Dec-12 23:26
sr15918-Dec-12 23:26 
SuggestionRe: Unable to start program http://localhost:1837/default.aspx using VS 2008 in Windows XP IE 8 Pin
Richard MacCutchan18-Dec-12 23:52
mveRichard MacCutchan18-Dec-12 23:52 
QuestionCustomer Hacking System Time Pin
Klockness18-Dec-12 4:33
Klockness18-Dec-12 4:33 
AnswerRe: Customer Hacking System Time Pin
Richard MacCutchan18-Dec-12 6:46
mveRichard MacCutchan18-Dec-12 6:46 

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.