Curioustab
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Take Free Test
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Take Free Test
Interfaces Questions
C#.NET — Interfaces: choose the correct statement.
C#.NET — Object size with only interface implementations: what is the instance size? A class implements two interfaces (each with three methods) and has no instance fields. What is the size of an object created from this class?
C#.NET — Interfaces: choose the correct statement about members and implementation.
C#.NET — Which kinds of types can implement an interface? Consider these candidates: (1) Data (n/a), (2) Class, (3) Enum, (4) Structure, (5) Namespace. Select all that can implement an interface.
C#.NET — Interfaces: pick the single correct statement (clarifying implementation vs inheritance).
C#.NET — Interface and class implementation details: analyze this code. interface IMyInterface { void fun1(); int fun2(); } class MyClass : IMyInterface { void fun1() { } int IMyInterface.fun2() { return 0; } } Which statement best describes the situation?
C#.NET — Which statements about interfaces are correct? 1) An interface can contain properties, methods, and events. 2) The keyword 'must implement' forces implementation of an interface. 3) Interfaces can be overloaded. 4) Interfaces can be implemented by a class or a struct. 5) Enhanced implementations of an interface can be developed without breaking existing code (by adding new implementing types without changing the interface).
C#.NET — Which members can be declared inside an interface? Consider: 1) Properties 2) Methods 3) Enumerations 4) Events 5) Structures
C#.NET — Is the following interface definition valid? interface IPerson { string FirstName { get; set; } string LastName { get; set; } void Print(); void Stock(); int Fun(); }
C#.NET — Consider explicit interface implementation with a partially implemented interface. interface IMyInterface { void fun1(); void fun2(); } class MyClass : IMyInterface { private int i; void IMyInterface.fun1() { /* code */ } // fun2 not implemented here } What is correct?
C#.NET — Choose the correct implementation for the interface: interface IMyInterface { double MyFun(Single i); }
C#.NET — Which statement about interfaces is correct?
C#.NET — Which is a correct implementation of the IPerson interface? interface IPerson { string FirstName { get; set; } }
C#.NET — Which statement about interfaces is correct?
C#.NET — Which statements about interfaces are correct? 1) A class can implement multiple interfaces. 2) Structures cannot inherit a class but can implement an interface. 3) In C#.NET, the colon (:) is used to signify that a class member implements a specific interface. 4) An interface can implement multiple classes. 5) The static modifier can be used on a method that implements an interface member.