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
Andy Sujoto
NA
8
19.7k
Custom Object with parameter in declaration
Sep 21 2010 6:13 AM
Hi all,
How do i create a custom object that derived from existing object + a parameter that can i pass to this custom object? Where should i put the coding the add the object ?
For example :
i create a custom panel, but i want to be a able to pass parameter (in declaration) to add 1 object to the panel.
in the command might look like this :
MyPanel mp = new MyPanel(ObjectA);
and i don't want like this :
MyPanel mp = new MyPanel();
mp.AddingNewObject(ObjectA);
The real example as we can seen on OleDbCommand :
we can just issue :
OleDbCommand odc = new OleDbCommand("SELECT * FROM Table1");
rather than:
OleDbCommand odc = new OleDbCommand();
odc.CommandText = "SELECT * FROM Table1";
Thanks,
Andy
Reply
Answers (
2
)
Windows Service stops triggering monitoring event for starting process
How to get the value of Array in another method?