interface
How should I implement interface composition?
I have this situation: public interface IHasValue<T> { T Value { get; set; } } public interface IClickable[详细]
2023-04-09 01:07 分类:问答Does foreach use IEnumerator/IEnumerable for built-in types?
Does the foreach loop use interfaces IEnumerator and IEnumerable only for iterating the objects of custom types (classes)or also fo开发者_开发技巧r iterating the built-in types (behind the scenes)?For[详细]
2023-04-09 01:01 分类:问答Why do I receive a "cannot find symbol" error when compiling this interface method?
I\'m using the interface Place: public interface Place { int distance(Place other); } But when I try to implement the interface and compile the followi开发者_运维知识库ng code, a \"cannot find symb[详细]
2023-04-08 22:31 分类:问答Interface, Abstract, or just virtual methods?
I have a bunch of systems, lets call them A, B, C, D, E, F, G, H, I, J. They all have similar methods and properties.Some contain the exact same method and properties, some may vary slightly and some[详细]
2023-04-08 22:06 分类:问答Dialog manipulation
I w开发者_C百科ant to create a dialog window, where the user can perform various tasks, and would like him to return from the dialog by clicking on the Cancel button with the mouse (i.e. not by hittin[详细]
2023-04-08 20:30 分类:问答If security is not an issue, is an immutable interface a good pattern?
It is commonly suggested that immutable classes should be sealed, to enforce a promise to consumers that observed properties of the class will remain invariant.Certainly that would seem a good practic[详细]
2023-04-08 16:57 分类:问答Map multiple entities to EF4 abstract base class or interface?
I have multiple tables in a db that are identical in terms of column structure. I\'d like to have this modelled in EF4 so that they all inherit from a single abstract base class, so I can write commo[详细]
2023-04-08 10:13 分类:问答Find only non-inherited interfaces?
I am trying to perform a query on the interfaces of a class via reflectio开发者_StackOverflow中文版n, however the method Type.GetInterfaces() returns all the inherited interfaces also.[详细]
2023-04-08 09:31 分类:问答Generic Interface, IEnumerable
I Have the following code: using System; using System.Collections.Generic; using System.Linq; using System.Text;[详细]
2023-04-07 20:48 分类:问答Base Classes on Proxy Objects
I have a webservice that is wrapped up by a data access object and is accessed by many different UI controls.[详细]
2023-04-07 17:40 分类:问答