Click here to Skip to main content
15,894,343 members
Home / Discussions / C#
   

C#

 
QuestionMock object frameworks for .net 2.0 Pin
seahawk4225-Oct-05 0:03
seahawk4225-Oct-05 0:03 
QuestionUploading and resizing Image files Pin
Brendan Vogt24-Oct-05 23:43
Brendan Vogt24-Oct-05 23:43 
AnswerRe: Uploading and resizing Image files Pin
KaptinKrunch25-Oct-05 2:46
KaptinKrunch25-Oct-05 2:46 
QuestionUpdater Application Block for Office Add In Pin
JeremyHutchinson24-Oct-05 23:19
JeremyHutchinson24-Oct-05 23:19 
Questiona couple of C# questions Pin
Brendan Vogt24-Oct-05 23:05
Brendan Vogt24-Oct-05 23:05 
AnswerRe: a couple of C# questions Pin
Rob Philpott24-Oct-05 23:52
Rob Philpott24-Oct-05 23:52 
QuestionRe: a couple of C# questions Pin
Brendan Vogt25-Oct-05 1:06
Brendan Vogt25-Oct-05 1:06 
AnswerRe: a couple of C# questions Pin
Rob Philpott25-Oct-05 1:33
Rob Philpott25-Oct-05 1:33 
Hi again,

ma se wrote:
...would I still need to convert the value to a decimal where it is being called...

This depends on what you're assigning to. Ultimately the return type is Object even if its a boxed decimal, so unless your assigning to another Object you'd need to cast it. For instance if your paramPound.Value is of type decimal you would have to do this:

paramPound.Value = (decimal)Globals.CheckDecimalForDb(objProperty.Pound)

but this line would throw an invalid cast exception in the instance where you return DBNull.

If paramPound.Value is of type Object, you can leave the cast out, and no exceptions are thrown, but this presumes that paramPound.Value can deal with an object which could either be a boxed decimal or DBNull.

I hope that sort of answers your question...

BTW - I think you are correct to use decimal for currency.

As for the datagrid, I'm afraid I'm unfamiliar with this and have no suggestions.

Rob Philpott.
QuestionRe: a couple of C# questions Pin
Brendan Vogt25-Oct-05 1:50
Brendan Vogt25-Oct-05 1:50 
AnswerRe: a couple of C# questions Pin
Rob Philpott25-Oct-05 2:05
Rob Philpott25-Oct-05 2:05 
AnswerRe: a couple of C# questions Pin
Gavin Jeffrey25-Oct-05 0:00
Gavin Jeffrey25-Oct-05 0:00 
QuestionRe: a couple of C# questions Pin
Brendan Vogt25-Oct-05 1:12
Brendan Vogt25-Oct-05 1:12 
AnswerRe: a couple of C# questions Pin
Brian Leach25-Oct-05 10:39
Brian Leach25-Oct-05 10:39 
QuestionPlease help me... Pin
KORCARI24-Oct-05 21:39
KORCARI24-Oct-05 21:39 
AnswerRe: Please help me... Pin
Peto198325-Oct-05 2:11
Peto198325-Oct-05 2:11 
QuestionC# Reflection Pin
koyllis24-Oct-05 21:06
koyllis24-Oct-05 21:06 
AnswerRe: C# Reflection Pin
Rob Philpott25-Oct-05 0:05
Rob Philpott25-Oct-05 0:05 
QuestionOther sources with C# Pin
Anonymous24-Oct-05 19:29
Anonymous24-Oct-05 19:29 
AnswerRe: Other sources with C# Pin
Christian Graus24-Oct-05 19:33
protectorChristian Graus24-Oct-05 19:33 
QuestionCreating toolbox in C# Pin
nps_ltv24-Oct-05 19:05
nps_ltv24-Oct-05 19:05 
AnswerRe: Creating toolbox in C# Pin
Christian Graus24-Oct-05 19:13
protectorChristian Graus24-Oct-05 19:13 
AnswerRe: Creating toolbox in C# Pin
edvo25-Oct-05 0:42
edvo25-Oct-05 0:42 
QuestionData posting Pin
NET_GEEK24-Oct-05 18:21
NET_GEEK24-Oct-05 18:21 
QuestionServer.Create(<Object>) Pin
NET_GEEK24-Oct-05 18:16
NET_GEEK24-Oct-05 18:16 
AnswerRe: Server.Create(<Object>) Pin
Christian Graus24-Oct-05 18:51
protectorChristian Graus24-Oct-05 18:51 

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.