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
DICS Purnea
NA
29
744
Abstract Class implements the methods of Interface
Aug 28 2019 12:49 AM
Any one help me to answer the below issue. We have one interface ICollection and one abstract class CollectionBase that inherit the ICollection. That already define in System.Collections library.
[ComVisible(
true
)]
public
interface
ICollection : IEnumerable
{
int
Count {
get
; }
object
SyncRoot {
get
; }
bool
IsSynchronized {
get
; }
void
CopyTo(Array array,
int
index);
}
//Abstract Class
public
abstract
class
CollectionBase : IList, ICollection, IEnumerable
{
protected
CollectionBase();
protected
CollectionBase(
int
capacity);
[ComVisible(
false
)]
public
int
Capacity {
get
;
set
; }
public
int
Count {
get
; }
protected
ArrayList InnerList {
get
; }
protected
IList List {
get
; }
public
void
Clear();
public
IEnumerator GetEnumerator();
public
void
RemoveAt(
int
index);
protected
virtual
void
OnClear();
protected
virtual
void
OnClearComplete();
protected
virtual
void
OnInsert(
int
index,
object
value);
protected
virtual
void
OnInsertComplete(
int
index,
object
value);
protected
virtual
void
OnRemove(
int
index,
object
value);
protected
virtual
void
OnRemoveComplete(
int
index,
object
value);
protected
virtual
void
OnSet(
int
index,
object
oldValue,
object
newValue);
protected
virtual
void
OnSetComplete(
int
index,
object
oldValue,
object
newValue);
protected
virtual
void
OnValidate(
object
value);
}
As we know that the class which inherits interface that we must have to implements all methods of the interface. How it is possible that CollectionBase class that didn't implements all the methods of ICollection Interface.
Reply
Answers (
5
)
ajax c# html excel
ajax c# html jquery