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

C#

 
GeneralRe: Would this validate an Email ??? Pin
Paw Jershauge19-Jan-10 20:51
Paw Jershauge19-Jan-10 20:51 
QuestionRunDll32.exe Help Pin
User 674486819-Jan-10 11:07
professionalUser 674486819-Jan-10 11:07 
AnswerRe: RunDll32.exe Help Pin
Paw Jershauge19-Jan-10 11:30
Paw Jershauge19-Jan-10 11:30 
GeneralRe: RunDll32.exe Help Pin
Pete O'Hanlon19-Jan-10 11:45
mvePete O'Hanlon19-Jan-10 11:45 
AnswerRe: RunDll32.exe Help Pin
Pete O'Hanlon19-Jan-10 11:39
mvePete O'Hanlon19-Jan-10 11:39 
GeneralRe: RunDll32.exe Help Pin
User 674486819-Jan-10 20:59
professionalUser 674486819-Jan-10 20:59 
AnswerRe: RunDll32.exe Help Pin
Paw Jershauge19-Jan-10 21:39
Paw Jershauge19-Jan-10 21:39 
QuestionEXCEPTION HANDLING Pin
mukundkallapur19-Jan-10 8:09
mukundkallapur19-Jan-10 8:09 
Kindly check the below program.

/* Brief Decsription : This program checks whether the entered chatacter is a numeral or no.
I have used the IsDigit Method. The issue here is that, the input from keyboard is a string,
whereas the IsDigit method needs a character. Hence I have converted the string input to a character.

Now, when I enter any number from 0 to 9, it perfoms the functionality of addition and also if I 
enter any character it hroes an Exception. But if I enter any 2 digit number, then also it throws an
Exception, which is system generated. 

This is because of that converison to character. 

Kindly provide a solution wherein I can enter numerals greater than 9 without error */

using System;

namespsace TestException3
{
Class program
{
static void Main(string args[])
{
try
{
string s1,s2,ans;
char type,type1;

Console.WriteLine("please enter the variables : ");
s1=Console.ReadLine();
s2=Console.ReadLine();

type=Convert.ToChar(s1);
type1=Convert.ToChar(s2);

if(!(char.IsDigit(type)) || !(char.IsDigit(type1)))
{
throw new Exception("Please Enter numbers only");
}
else
{
ans=Convert.ToString(Convert.ToInt32(s1)+Convert.ToInt32(s2));
Console.WriteLine(Answer : {0}",ans);
Console.ReadLine();
}
catch(Exception e)
{
Console.WriteLine("Message : {0}", e.Message);
Console.ReadLine();
}
}
}
}

AnswerRe: EXCEPTION HANDLING Pin
Jimmanuel19-Jan-10 8:14
Jimmanuel19-Jan-10 8:14 
AnswerRe: EXCEPTION HANDLING Pin
Bardy8519-Jan-10 8:36
Bardy8519-Jan-10 8:36 
AnswerRe: EXCEPTION HANDLING Pin
Migounette19-Jan-10 12:15
Migounette19-Jan-10 12:15 
QuestionMobile webbrowser control not displaying local image... Pin
Jacob Dixon19-Jan-10 4:54
Jacob Dixon19-Jan-10 4:54 
AnswerRe: Mobile webbrowser control not displaying local image... Pin
OriginalGriff19-Jan-10 5:41
mveOriginalGriff19-Jan-10 5:41 
GeneralRe: Mobile webbrowser control not displaying local image... Pin
Jacob Dixon19-Jan-10 6:03
Jacob Dixon19-Jan-10 6:03 
AnswerRe: Mobile webbrowser control not displaying local image... Pin
Luc Pattyn19-Jan-10 5:46
sitebuilderLuc Pattyn19-Jan-10 5:46 
QuestionShow a modeless form from an app with no main form? Pin
John Whitmire19-Jan-10 4:40
professionalJohn Whitmire19-Jan-10 4:40 
AnswerRe: Show a modeless form from an app with no main form? Pin
John Whitmire20-Jan-10 6:41
professionalJohn Whitmire20-Jan-10 6:41 
GeneralRating my Article Pin
ADNANE-Dev19-Jan-10 3:08
ADNANE-Dev19-Jan-10 3:08 
GeneralSort of Repost of something that was flamed in the first place Pin
Keith Barrow19-Jan-10 3:12
professionalKeith Barrow19-Jan-10 3:12 
GeneralRe: Sort of Repost of something that was flamed in the first place Pin
OriginalGriff19-Jan-10 3:48
mveOriginalGriff19-Jan-10 3:48 
GeneralRe: Rating my Article Pin
Not Active19-Jan-10 3:45
mentorNot Active19-Jan-10 3:45 
RantRe: Rating my Article Pin
dan!sh 19-Jan-10 3:49
professional dan!sh 19-Jan-10 3:49 
GeneralRe: Rating my Article Pin
Muammar©19-Jan-10 4:41
Muammar©19-Jan-10 4:41 
GeneralRe: Rating my Article Pin
loyal ginger19-Jan-10 4:43
loyal ginger19-Jan-10 4:43 
GeneralRe: Rating my Article Pin
0x3c019-Jan-10 5:12
0x3c019-Jan-10 5:12 

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.