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
Tommy Sin
NA
19
104.3k
Regarding the question about the function and enum.
Apr 5 2011 2:02 PM
Hello.
The source code is below. And Then, what is the purpose of enum in the parameter in this case although it doesnt have any usage?
Here is the source code.
public enum SilentLoud
{
Silent = -1,
Loud = 0
}
public bool Close()
{
return Close(SilentLoud.Loud);
}
public bool Close(SilentLoud silent)
{
if(!_initialised)
return false;
if(!IsConnected)
return false;
_client.Close();
return true;
}
Then, I am just wondering why Close Function is split into 2 functions in this case. Can we not merge the two functions in to one like this?
public bool Close()
{
if(!_initialised)
return false;
if(!IsConnected)
return false;
_client.Close();
return true;
}
Reply
Answers (
1
)
Unable to get the Content of the text file saved in the Database(My-Sql)
project code ERROR