Click here to Skip to main content
15,887,241 members
Home / Discussions / C#
   

C#

 
AnswerRe: how i can run a dll Pin
Christian Graus25-Jun-08 0:23
protectorChristian Graus25-Jun-08 0:23 
GeneralRe: how i can run a dll Pin
wasimsharp25-Jun-08 0:37
wasimsharp25-Jun-08 0:37 
GeneralRe: how i can run a dll Pin
Christian Graus25-Jun-08 0:45
protectorChristian Graus25-Jun-08 0:45 
AnswerRe: how i can run a dll Pin
Mbah Dhaim25-Jun-08 3:43
Mbah Dhaim25-Jun-08 3:43 
Questiontreeview and mdichild Pin
ginji2025-Jun-08 0:06
ginji2025-Jun-08 0:06 
AnswerRe: treeview and mdichild Pin
DaveyM6925-Jun-08 7:56
professionalDaveyM6925-Jun-08 7:56 
GeneralRe: treeview and mdichild [modified] Pin
ginji2025-Jun-08 15:15
ginji2025-Jun-08 15:15 
QuestionInterfaces and Casting - I'm struggling. Pin
stovesy24-Jun-08 23:57
stovesy24-Jun-08 23:57 
A little background.

I'm playing with BusinessObjects and Factory(s) which contain collections of BusinessObjects.

My business objects all derive from a BusinessObjectBase class.
I have an IBusinessObjectBase interface, which the BusinessObjectBase implements.

My factory objects all derive from a FactoryBase class.
The FactoryBase class is generic (FactoryBase<T> where T : IBusinessObjectBase)
I have an IFactoryBase interface, which the FactoryBase impliments.
public interface IFactoryBase<T> where T : IBusinessObjectBase

Everything works fine (I'm not sure if the model is a little simplistic maybe)

Now.
I'm wanting to create a status bar, which displays a few properties from the current BusinessObject, and the currenct Factory (Like data errors, read only info etc.).
So I created a test to see how to go about this, but encountered a problem.

customerFactory cFact = new customerFactory();

if (cFact is IFactoryBase<IBusinessObjectBase> ) TestContext.WriteLine("IFactoryBase supported");
if (cFact is IComponent) TestContext.WriteLine("IComponent supported");
if (((IFactoryBase<IBusinessObjectBase> )cFact).IsClean) TestContext.WriteLine("Factory is clean");


customerFactory is derived from FactoryBase, and does indeed support the IFactoryBase interface.
public class customerFactory : FactoryBase<customer>
The customer object is derived from BusinessObjectBase, and supports IBusinessObjectBase

The first line, fails even though my Factory does support the interface.
The second line succeeds (IComponent is indeed supported)
And the third line fails to cast.

Many thanks.
AnswerRe: Interfaces and Casting - I'm struggling. Pin
leppie25-Jun-08 2:11
leppie25-Jun-08 2:11 
GeneralRe: Interfaces and Casting - I'm struggling. Pin
stovesy25-Jun-08 2:27
stovesy25-Jun-08 2:27 
GeneralRe: Interfaces and Casting - I'm struggling. Pin
leppie25-Jun-08 4:51
leppie25-Jun-08 4:51 
GeneralRe: Interfaces and Casting - I'm struggling. Pin
stovesy25-Jun-08 5:33
stovesy25-Jun-08 5:33 
AnswerRe: Interfaces and Casting - I'm struggling. Pin
leppie25-Jun-08 4:54
leppie25-Jun-08 4:54 
GeneralRe: Interfaces and Casting - I'm struggling. Pin
stovesy25-Jun-08 5:36
stovesy25-Jun-08 5:36 
GeneralRe: Interfaces and Casting - I'm struggling. Pin
leppie25-Jun-08 5:43
leppie25-Jun-08 5:43 
GeneralRe: Interfaces and Casting - I'm struggling. Pin
stovesy25-Jun-08 5:54
stovesy25-Jun-08 5:54 
AnswerRe: Interfaces and Casting - I'm struggling. Pin
Mark Churchill25-Jun-08 15:35
Mark Churchill25-Jun-08 15:35 
GeneralRe: Interfaces and Casting - I'm struggling. Pin
stovesy25-Jun-08 22:07
stovesy25-Jun-08 22:07 
Questionfilesystemwatcher Pin
arkiboys24-Jun-08 23:39
arkiboys24-Jun-08 23:39 
AnswerRe: filesystemwatcher Pin
leppie25-Jun-08 2:17
leppie25-Jun-08 2:17 
AnswerRe: filesystemwatcher Pin
Michael Bookatz25-Jun-08 2:42
Michael Bookatz25-Jun-08 2:42 
QuestionRegex.Split with a pipe | as separator Pin
GDavy24-Jun-08 23:38
GDavy24-Jun-08 23:38 
AnswerRe: Regex.Split with a pipe | as separator Pin
Guffa25-Jun-08 0:09
Guffa25-Jun-08 0:09 
GeneralRe: Regex.Split with a pipe | as separator Pin
GDavy25-Jun-08 0:19
GDavy25-Jun-08 0:19 
Questioncannot implicitly convert type 'int' to 'string' Pin
twistz24-Jun-08 23:34
twistz24-Jun-08 23:34 

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.