Click here to Skip to main content
15,513,631 members
Home / Discussions / C#
   

C#

 
QuestionDesign-Time editor for Custom object stores value into *.resx with $ variable prefix Pin
Bouditch11-Aug-10 0:01
Bouditch11-Aug-10 0:01 
QuestionECG wave extraction Pin
biaali10-Aug-10 23:56
biaali10-Aug-10 23:56 
AnswerRe: ECG wave extraction Pin
riced11-Aug-10 2:01
riced11-Aug-10 2:01 
Question.net remoting Pin
Member 59031010-Aug-10 21:01
Member 59031010-Aug-10 21:01 
Questioninstall sql server 2005 Pin
ram_kesari10-Aug-10 18:26
ram_kesari10-Aug-10 18:26 
AnswerRe: install sql server 2005 Pin
Luc Pattyn10-Aug-10 18:52
sitebuilderLuc Pattyn10-Aug-10 18:52 
AnswerRe: install sql server 2005 Pin
Abhinav S10-Aug-10 19:07
Abhinav S10-Aug-10 19:07 
QuestionHelp: Can't format string using String.Format Pin
roman_s10-Aug-10 10:17
roman_s10-Aug-10 10:17 
I cant seem to format my strAverageDensity which originally is in this example strAverageDensity = 30.000000123
using: string.Format("{0:0.00}", strAverageDensity);

need it to equal 30.00 in this case but 2 decimal places

instead its still strAverageDensity = 30.000000123

so this is the code:
EditSubCategory E = new EditSubCategory();

    SubCategory C = GlobalContextManager.Instance.Cache.GetSubCategory((int)R.Cells[0].Value);
    Category CC = GlobalContextManager.Instance.Cache.GetCategory(C.CategoryId);

  string strAverageDensity = Convert.ToString(GlobalContextManager.Instance.Conversions.ConvertMetricWeightToDefault(C.AverageDensity));

    E.ParentCategory = CC;
    E.Category = C.Name;
    E.IsActivated = C.IsEnabled;
    E.OriginalCategory = C.Name;

    strAverageDensity = string.Format("{0:0.00}", strAverageDensity);
    E.AverageDensity = strAverageDensity;

AnswerRe: Help: Can't format string using String.Format Pin
Ennis Ray Lynch, Jr.10-Aug-10 10:29
Ennis Ray Lynch, Jr.10-Aug-10 10:29 
AnswerRe: Help: Can't format string using String.Format Pin
OriginalGriff10-Aug-10 10:32
mveOriginalGriff10-Aug-10 10:32 
AnswerRe: Help: Can't format string using String.Format Pin
Luc Pattyn10-Aug-10 10:34
sitebuilderLuc Pattyn10-Aug-10 10:34 
AnswerRe: Help: Can't format string using String.Format Pin
ignrod10-Aug-10 10:42
ignrod10-Aug-10 10:42 
AnswerRe: Help: Can't format string using String.Format Pin
Martin shooster10-Aug-10 11:17
Martin shooster10-Aug-10 11:17 
AnswerRe: Help: Can't format string using String.Format Pin
PIEBALDconsult10-Aug-10 18:24
professionalPIEBALDconsult10-Aug-10 18:24 
AnswerRe: Help: Can't format string using String.Format Pin
Luc Pattyn10-Aug-10 18:51
sitebuilderLuc Pattyn10-Aug-10 18:51 
GeneralRe: Help: Can't format string using String.Format Pin
PIEBALDconsult11-Aug-10 4:09
professionalPIEBALDconsult11-Aug-10 4:09 
GeneralRe: Help: Can't format string using String.Format Pin
Luc Pattyn11-Aug-10 4:25
sitebuilderLuc Pattyn11-Aug-10 4:25 
GeneralRe: Help: Can't format string using String.Format Pin
PIEBALDconsult11-Aug-10 17:17
professionalPIEBALDconsult11-Aug-10 17:17 
QuestionEmail - invalid remote certificate Pin
Running Fool10-Aug-10 9:13
Running Fool10-Aug-10 9:13 
AnswerRe: Email - invalid remote certificate Pin
Matt Meyer10-Aug-10 10:13
Matt Meyer10-Aug-10 10:13 
AnswerRe: Email - invalid remote certificate Pin
DaveyM6910-Aug-10 12:22
professionalDaveyM6910-Aug-10 12:22 
GeneralRe: Email - invalid remote certificate Pin
Running Fool10-Aug-10 12:39
Running Fool10-Aug-10 12:39 
GeneralRe: Email - invalid remote certificate Pin
DaveyM6910-Aug-10 13:12
professionalDaveyM6910-Aug-10 13:12 
QuestionMerging two datatables Pin
norjali10-Aug-10 7:28
norjali10-Aug-10 7:28 
AnswerRe: Merging two datatables Pin
Ennis Ray Lynch, Jr.10-Aug-10 7:38
Ennis Ray Lynch, Jr.10-Aug-10 7:38 

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.