Click here to Skip to main content
15,897,518 members
Home / Discussions / C#
   

C#

 
GeneralRe: Need handle to ComboBox dropdown button Pin
Heath Stewart23-Jul-04 6:17
protectorHeath Stewart23-Jul-04 6:17 
GeneralRe: Need handle to ComboBox dropdown button Pin
ddelapasse23-Jul-04 6:48
ddelapasse23-Jul-04 6:48 
GeneralRe: Need handle to ComboBox dropdown button Pin
Nick Parker23-Jul-04 7:58
protectorNick Parker23-Jul-04 7:58 
GeneralRe: Need handle to ComboBox dropdown button Pin
Heath Stewart23-Jul-04 8:39
protectorHeath Stewart23-Jul-04 8:39 
GeneralDirecroty search Pin
Ronni Marker23-Jul-04 4:03
Ronni Marker23-Jul-04 4:03 
GeneralRe: Direcroty search Pin
Colin Angus Mackay23-Jul-04 4:54
Colin Angus Mackay23-Jul-04 4:54 
GeneralReturning objects to another class Pin
Paul Kiddie23-Jul-04 1:19
Paul Kiddie23-Jul-04 1:19 
GeneralRe: Returning objects to another class Pin
Heath Stewart23-Jul-04 9:05
protectorHeath Stewart23-Jul-04 9:05 
Well, the interface you're talking about wouldn't be tied directly with the Outlook object model (OOM), no other PIMs. As for a collection or array of objects, that's pretty simple: object[]. Since the OOM and any other PIMs' OMs would define types that you can't change (like implement other interfaces, and casting down may not always work) so you'd have to return a generic object. That doesn't help you much, though. You'd have to use reflection or the component model to discover properties and methods, and that would be very grueling. Another idea is to encapsulate the objects themselves into yet another interface or abstract class. This would require you to - for each item - wrap it (in your provider, since what you're referring to is a provider pattern) and store it in a collection or list (which is also a collection), then return that collection. That's not an uncommon approach, however. The component model - in many places - actually uses reflection, wraps properties (for example) in PropertyDescriptors, puts those in a PropertyDescriptorCollection, and returns that.

To aide with the component model (for good design-time behavior), you might also look into implementing the ICustomTypeDescriptor interface if you want to customize the behavior or such a base class for use in the component model (to return "virtual" properties (shadowed), etc.).

 

Microsoft MVP, Visual C#
My Articles
Generalcapturing the modifications in a datagrid Pin
samithas23-Jul-04 0:29
samithas23-Jul-04 0:29 
GeneralRe: capturing the modifications in a datagrid Pin
Heath Stewart23-Jul-04 8:59
protectorHeath Stewart23-Jul-04 8:59 
GeneralRe: capturing the modifications in a datagrid Pin
samithas23-Jul-04 19:35
samithas23-Jul-04 19:35 
GeneralRe: capturing the modifications in a datagrid Pin
Heath Stewart26-Jul-04 2:25
protectorHeath Stewart26-Jul-04 2:25 
GeneralOnTimedEvent Pin
karanba22-Jul-04 21:48
karanba22-Jul-04 21:48 
GeneralRe: OnTimedEvent Pin
Bill Dean23-Jul-04 8:16
Bill Dean23-Jul-04 8:16 
General.NET framework theories Pin
TalkingBabb0t22-Jul-04 17:17
TalkingBabb0t22-Jul-04 17:17 
GeneralRe: .NET framework theories Pin
Michael P Butler23-Jul-04 5:10
Michael P Butler23-Jul-04 5:10 
GeneralRe: .NET framework theories Pin
TalkingBabb0t23-Jul-04 9:25
TalkingBabb0t23-Jul-04 9:25 
GeneralNavigate from Child to Parent Pin
KKCodePro22-Jul-04 16:31
KKCodePro22-Jul-04 16:31 
GeneralRe: Navigate from Child to Parent Pin
Dave Kreskowiak22-Jul-04 16:54
mveDave Kreskowiak22-Jul-04 16:54 
GeneralRe: Navigate from Child to Parent Pin
KKCodePro22-Jul-04 16:58
KKCodePro22-Jul-04 16:58 
GeneralRe: Navigate from Child to Parent Pin
exhaulted23-Jul-04 0:46
exhaulted23-Jul-04 0:46 
GeneralRe: Navigate from Child to Parent Pin
Dave Kreskowiak23-Jul-04 1:21
mveDave Kreskowiak23-Jul-04 1:21 
QuestionDragging image inside the RichTextBox ? Pin
sachinkalse22-Jul-04 15:59
sachinkalse22-Jul-04 15:59 
Generaliterate over datagrid Pin
kloepper22-Jul-04 15:26
kloepper22-Jul-04 15:26 
GeneralRe: iterate over datagrid Pin
Roman Rodov22-Jul-04 15:40
Roman Rodov22-Jul-04 15:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.