Click here to Skip to main content
16,018,637 members
Home / Discussions / C#
   

C#

 
AnswerRe: Help with a program that's made in c# - I have the source Pin
Garth J Lancaster19-Jul-20 2:42
professionalGarth J Lancaster19-Jul-20 2:42 
AnswerRe: Help with a program that's made in c# - I have the source Pin
Richard MacCutchan19-Jul-20 3:47
mveRichard MacCutchan19-Jul-20 3:47 
QuestionHow to debug Web Service with remote debug? Pin
Member 767463417-Jul-20 3:31
Member 767463417-Jul-20 3:31 
AnswerRe: How to debug Web Service with remote debug? Pin
Dave Kreskowiak17-Jul-20 10:36
mveDave Kreskowiak17-Jul-20 10:36 
GeneralRe: How to debug Web Service with remote debug? Pin
Member 767463419-Jul-20 22:15
Member 767463419-Jul-20 22:15 
QuestionHandling a Leading Decimal in a TextBox Pin
Member 1487212816-Jul-20 9:48
Member 1487212816-Jul-20 9:48 
AnswerRe: Handling a Leading Decimal in a TextBox Pin
OriginalGriff16-Jul-20 9:58
mveOriginalGriff16-Jul-20 9:58 
AnswerRe: Handling a Leading Decimal in a TextBox Pin
Richard MacCutchan16-Jul-20 21:32
mveRichard MacCutchan16-Jul-20 21:32 
You could simplify that code and make it easier to debug:
C#
float test1 = 1;
int test2 = 0;

if (tbAI0LineSlope.Text.Length > 0)
{
    if (!Float.TryParse(tbAI0LineSlope.Text, out test1))
    {
        // display error message or throw an exception if the text is not a valid number
    }
}
if (tbAI0Offset.Text.Length > 0)
{
    if (!Int.TryParse(tbAI0Offset.Text, out test2))
    {
        // display error message or throw an exception if the text is not a valid number
    }
}

float test3 = iData[7] * test1 + test2;
tbAI0Val.Text = test3.ToString();

GeneralRe: Handling a Leading Decimal in a TextBox Pin
Member 1487212817-Jul-20 2:52
Member 1487212817-Jul-20 2:52 
GeneralRe: Handling a Leading Decimal in a TextBox Pin
Richard MacCutchan17-Jul-20 3:07
mveRichard MacCutchan17-Jul-20 3:07 
QuestionHow to generate automatic test cases for any simple module Pin
sagarpallavi16-Jul-20 1:09
sagarpallavi16-Jul-20 1:09 
AnswerMy Downvote Pin
Keith Barrow16-Jul-20 3:58
professionalKeith Barrow16-Jul-20 3:58 
AnswerRe: How to generate automatic test cases for any simple module Pin
jkirkerx16-Jul-20 8:23
professionaljkirkerx16-Jul-20 8:23 
AnswerRe: How to generate automatic test cases for any simple module Pin
F-ES Sitecore17-Jul-20 1:15
professionalF-ES Sitecore17-Jul-20 1:15 
AnswerRe: How to generate automatic test cases for any simple module Pin
Gerry Schmitz17-Jul-20 4:27
mveGerry Schmitz17-Jul-20 4:27 
QuestionDoc version management Pin
cp-andy15-Jul-20 22:15
cp-andy15-Jul-20 22:15 
AnswerRe: Doc version management Pin
OriginalGriff15-Jul-20 22:22
mveOriginalGriff15-Jul-20 22:22 
GeneralRe: Doc version management Pin
#realJSOP15-Jul-20 23:44
professional#realJSOP15-Jul-20 23:44 
GeneralRe: Doc version management Pin
cp-andy16-Jul-20 1:35
cp-andy16-Jul-20 1:35 
GeneralRe: Doc version management Pin
OriginalGriff16-Jul-20 1:46
mveOriginalGriff16-Jul-20 1:46 
AnswerRe: Doc version management Pin
Pete O'Hanlon16-Jul-20 9:23
mvePete O'Hanlon16-Jul-20 9:23 
AnswerRe: Doc version management Pin
Gerry Schmitz17-Jul-20 4:36
mveGerry Schmitz17-Jul-20 4:36 
QuestionPadding a string with integers on its right keeping string length fixed Pin
simpledeveloper14-Jul-20 7:56
simpledeveloper14-Jul-20 7:56 
AnswerRe: Padding a string with integers on its right keeping string length fixed Pin
OriginalGriff14-Jul-20 8:25
mveOriginalGriff14-Jul-20 8:25 
GeneralRe: Padding a string with integers on its right keeping string length fixed Pin
simpledeveloper14-Jul-20 10:33
simpledeveloper14-Jul-20 10:33 

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.