Click here to Skip to main content
15,918,742 members
Home / Discussions / C#
   

C#

 
AnswerRe: Configuration files Pin
Rick van Woudenberg22-Jan-07 9:45
Rick van Woudenberg22-Jan-07 9:45 
AnswerRe: Configuration files Pin
Dave Kreskowiak22-Jan-07 10:09
mveDave Kreskowiak22-Jan-07 10:09 
GeneralRe: Configuration files Pin
peshawarcoder23-Jan-07 4:27
peshawarcoder23-Jan-07 4:27 
GeneralRe: Configuration files Pin
Dave Kreskowiak23-Jan-07 12:32
mveDave Kreskowiak23-Jan-07 12:32 
QuestionSoapExtensionAttribute at the client proxy side Pin
Walter Dias22-Jan-07 8:55
professionalWalter Dias22-Jan-07 8:55 
Questionhide a file Pin
nima_dir22-Jan-07 7:24
nima_dir22-Jan-07 7:24 
AnswerRe: hide a file Pin
aamironline24-Jan-07 15:33
aamironline24-Jan-07 15:33 
QuestionDecimal roundoff problem Pin
Rick van Woudenberg22-Jan-07 7:15
Rick van Woudenberg22-Jan-07 7:15 
Gents / Ladies,

I have a monetary value in a database that I extract. Due to this, I use decimal rather then double if I want to do any calculations later on. I run the following method :

decimal? abaCnt;
abaCnt = ((abCnt / 100) * 19);
txtBTW.Text = abaCnt.ToString();


This works fine, however the outcome is 967.9304 ... and I want it rounded off at 2 decimals : 967.93

if I use double, I can easily round it if by using :

double AA = Convert.ToDouble(this.txtBTW.Text);
double subrounded = Math.Round(AA, 2);


Is there a simple way doing this with the parameter decimal as well.
I couldn't find anything on the net that could explain to me how it's done.

Cheers,
AnswerRe: Decimal roundoff problem Pin
Stefan Troschuetz22-Jan-07 7:24
Stefan Troschuetz22-Jan-07 7:24 
AnswerRe: Decimal roundoff problem Pin
PIEBALDconsult22-Jan-07 7:29
mvePIEBALDconsult22-Jan-07 7:29 
AnswerRe: Decimal roundoff problem (solved) Pin
Rick van Woudenberg22-Jan-07 8:22
Rick van Woudenberg22-Jan-07 8:22 
GeneralRe: Decimal roundoff problem (solved) Pin
Guffa22-Jan-07 9:51
Guffa22-Jan-07 9:51 
GeneralRe: Decimal roundoff problem (solved) Pin
Dave Kreskowiak22-Jan-07 10:46
mveDave Kreskowiak22-Jan-07 10:46 
GeneralRe: Decimal roundoff problem (solved) Pin
Rick van Woudenberg22-Jan-07 21:34
Rick van Woudenberg22-Jan-07 21:34 
GeneralRe: Decimal roundoff problem (solved) Pin
Stefan Troschuetz22-Jan-07 21:58
Stefan Troschuetz22-Jan-07 21:58 
GeneralRe: Decimal roundoff problem (solved) Pin
Dave Kreskowiak23-Jan-07 2:14
mveDave Kreskowiak23-Jan-07 2:14 
QuestionCAO serialization on Client side [modified] Pin
mdzieg22-Jan-07 7:03
mdzieg22-Jan-07 7:03 
AnswerRe: CAO serialization on Client side Pin
Marc Clifton22-Jan-07 8:06
mvaMarc Clifton22-Jan-07 8:06 
GeneralRe: CAO serialization on Client side Pin
mdzieg22-Jan-07 8:31
mdzieg22-Jan-07 8:31 
AnswerRe: CAO serialization on Client side Pin
mdzieg22-Jan-07 11:51
mdzieg22-Jan-07 11:51 
GeneralRe: CAO serialization on Client side [modified] Pin
mdzieg23-Jan-07 6:32
mdzieg23-Jan-07 6:32 
QuestionProgrammatically sharing a drive Pin
Marc Clifton22-Jan-07 6:52
mvaMarc Clifton22-Jan-07 6:52 
AnswerRe: Programmatically sharing a drive Pin
Rick van Woudenberg22-Jan-07 9:42
Rick van Woudenberg22-Jan-07 9:42 
AnswerRe: Programmatically sharing a drive Pin
Scott Dorman28-Jan-07 6:39
professionalScott Dorman28-Jan-07 6:39 
QuestionUsing LDAP for user authentication Pin
mav.northwind22-Jan-07 6:35
mav.northwind22-Jan-07 6:35 

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.