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
edkceosc
NA
3
1.2k
How to use params instead of method overloading...
Aug 18 2013 3:33 PM
Hello there, I'm a noob to programming and C#. So far I love programming and in fact C#. I've got a question (probably a dummie one) but If you guys can help me out or put me in the right direction.. I'll apreciate it..
The thing is I have this method in my class where I use the overloading caracteristics...
protected bool SinInformacion(string prueba)
{
bool valor;
valor = string.IsNullOrEmpty(prueba);
return valor;
}
protected bool SinInformacion(string prueba, string prueba2)
{
bool valor;
valor = string.IsNullOrEmpty(prueba) && string.IsNullOrEmpty(prueba2);
return valor;
}
protected bool SinInformacion(string prueba, string prueba2, string prueba3)
{
bool valor;
valor = string.IsNullOrEmpty(prueba) && string.IsNullOrEmpty(prueba2) && string.IsNullOrEmpty(prueba3);
return valor;
}
And my question raises When I try to be "efficient" and apply "good software practices"
How can I use "params" instead of overloading?
I'm trying to figure out the logic but my unexperience in programming just don't help me
I'd appreciate if someone help me here, thanks in advance
Reply
Answers (
3
)
Inconsistent accessibility
Cant read/load more than 256 rule pharse in xml file