TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
harry code
NA
124
22.8k
Using finally block woth out catch block
Mar 31 2018 7:50 AM
Hi...I want to use try block and finally block..with out using catch block.
I am able to execute finally block when i am using cntr+F5.....But not when directly using F5..Is it Manditory to use cntrl??????
My code is below.....
public void Ex()
{
try
{
Console.WriteLine("enter the first number");
int a = int.Parse(Console.ReadLine());
Console.WriteLine("enter the second number");
int b = int.Parse(Console.ReadLine());
int c = a / b;
Console.WriteLine("the value is:" + c.ToString("c"));
}
finally
{
Console.WriteLine("Finally block is executed");
}
}
Reply
Answers (
9
)
Need clarification on xmldocument,xmlelement,xelement,xmlnod
c# doubt . database connection problem