Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi everyone,
Would this considered to be object dependency?

SomeMethod(SerializationInfo info)
{
   this.SomeInterfaceIHaveDeclaredAbove =   (SomeConcreteObject)info.GetValue("someName", typeof(SomeConcreteObject));
}


If so should I make the concrete objects as interfaces like so

SomeMethod(SerializationInfo info)
{
   this.SomeInterfaceIHaveDeclaredAbove 
      = (IConcreteObject)info.GetValue("someName", typeof(IConcreteObject));
}
Posted
Comments
Sergey Alexandrovich Kryukov 19-Nov-12 17:30pm    
Not clear why are you talking about object dependency at all. What's you goal? What objects are your trying to consider for the dependency, exactly? Why?
And "should I..." questions cannot be considered as valid before you tell us what you want to achieve.
--SA
Christian Graus 19-Nov-12 17:41pm    
Don't feel you need to conform to ideas you read in magazines on the toilet. Ask questions that tell us what you want to achieve, and why.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900