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
Grant McConville
NA
18
0
Inheritance / Polymorphism
May 24 2011 2:25 AM
Hi, I would like to know how to add a variable to collection or list in a inheriated class.
Any help would be much appreciated.
This is what I would to use it in
class MyGrid : DataGridView
{
// Code to add the enum MyStyle to the Columns Collection, calling it DisplayStyle
private void PaintCell(object sender, DataGridViewCellPaintingEventArgs e)
{
if (this.Columns[e.ColumnIndex].DisplayStyle == MyStyle.Currency)
{
// code here
}
}
enum MyStyle
{
Currency, Accounting, Other
}
}
Reply
Answers (
7
)
Malayalam font in c sharp
Printer setup