Click here to Skip to main content
15,845,436 members
Home / Discussions / C#
   

C#

 
AnswerRe: Do you know any good unit testing and mocking frameworks for C#? Pin
Alex Schunk8-Jan-18 8:10
Alex Schunk8-Jan-18 8:10 
Questiondownload pdf from pdfdrive.net Pin
Arnav Das31-Dec-17 21:38
Arnav Das31-Dec-17 21:38 
AnswerRe: download pdf from pdfdrive.net Pin
OriginalGriff31-Dec-17 21:46
mveOriginalGriff31-Dec-17 21:46 
QuestionDisabling ComboBox control item in DataTemplate Pin
Hervend31-Dec-17 5:00
Hervend31-Dec-17 5:00 
AnswerRe: Disabling ComboBox control item in DataTemplate Pin
Gerry Schmitz1-Jan-18 8:25
mveGerry Schmitz1-Jan-18 8:25 
AnswerRe: Disabling ComboBox control item in DataTemplate Pin
Gerry Schmitz3-Jan-18 7:01
mveGerry Schmitz3-Jan-18 7:01 
QuestionHow can I get my if-statements to work for my bmi caculator? C# Pin
Member 1360085430-Dec-17 20:23
Member 1360085430-Dec-17 20:23 
AnswerRe: How can I get my if-statements to work for my bmi caculator? C# Pin
Thomas Daniels30-Dec-17 21:48
mentorThomas Daniels30-Dec-17 21:48 
The BMI classification is defined like this:

  • Underweight = <18.5
  • Normal weight = 18.5-24.9
  • Overweight = 25-29.9
  • Obesity = >=30
(Source: Calculate Your BMI - Metric BMI Calculator[^])

To write that in your code, you can do this:
C#
if (bmi < 18.5)
{
    // underweight
}
else if (bmi < 25) // 18.5-24.9 (because we already checked <18.5 in the previous 'if'
{
    // normal weight
}
else if (bmi < 30) // 25-29.9
{
    // overweight
}
else // >= 30
{
    // obesity
}

The quick brown ProgramFOX jumps right over the Lazy<Dog>.

Questionuser settings on a server C# Pin
Member 1342240130-Dec-17 10:43
Member 1342240130-Dec-17 10:43 
AnswerRe: user settings on a server C# Pin
Dave Kreskowiak30-Dec-17 13:21
mveDave Kreskowiak30-Dec-17 13:21 
AnswerRe: user settings on a server C# Pin
Gerry Schmitz1-Jan-18 8:37
mveGerry Schmitz1-Jan-18 8:37 
Questionobject location Pin
Member 1296407930-Dec-17 8:58
Member 1296407930-Dec-17 8:58 
AnswerRe: object location Pin
Dave Kreskowiak30-Dec-17 13:15
mveDave Kreskowiak30-Dec-17 13:15 
QuestionMessage Closed Pin
30-Dec-17 4:27
Jason132330-Dec-17 4:27 
AnswerRe: Difference between String and StringBuilder? Pin
OriginalGriff30-Dec-17 5:29
mveOriginalGriff30-Dec-17 5:29 
AnswerRe: Difference between String and StringBuilder? Pin
Gerry Schmitz30-Dec-17 7:10
mveGerry Schmitz30-Dec-17 7:10 
QuestionHow to access a datagrid control (on a parent window) from a child window in wpf c# Pin
Hervend29-Dec-17 8:23
Hervend29-Dec-17 8:23 
AnswerRe: How to access a datagrid control (on a parent window) from a child window in wpf c# Pin
Dave Kreskowiak29-Dec-17 9:59
mveDave Kreskowiak29-Dec-17 9:59 
AnswerRe: How to access a datagrid control (on a parent window) from a child window in wpf c# Pin
Mycroft Holmes29-Dec-17 12:46
professionalMycroft Holmes29-Dec-17 12:46 
AnswerRe: How to access a datagrid control (on a parent window) from a child window in wpf c# Pin
Gerry Schmitz30-Dec-17 7:04
mveGerry Schmitz30-Dec-17 7:04 
GeneralRe: How to access a datagrid control (on a parent window) from a child window in wpf c# Pin
Hervend30-Dec-17 7:31
Hervend30-Dec-17 7:31 
QuestionWhat's the deal with Span<T> & Memory<T>? Pin
swampwiz28-Dec-17 23:06
swampwiz28-Dec-17 23:06 
AnswerRe: What's the deal with Span<T> & Memory<T>? Pin
Pete O'Hanlon29-Dec-17 0:40
subeditorPete O'Hanlon29-Dec-17 0:40 
QuestionC# Pin
Member 1359870428-Dec-17 21:16
Member 1359870428-Dec-17 21:16 
AnswerRe: C# Pin
Chris Quinn28-Dec-17 21:35
Chris Quinn28-Dec-17 21: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.