Link Details

Link 1127507 thumbnail
User 225256 avatar

By mswatcher
Submitted: Mar 18 2014 / 10:05

Here is what I was trying to accomplish. I have a method which accepts the interface IFieldValue but in my code scope I do not have an instance of anything which implements IFieldValue. Sure I could new up a new instance of something which implements IFieldValue but this is an issue for a few reasons, mostly because anything that currently implements IFieldValue is pretty heavy weight. Sure I could create a very small class that only implements IFieldValue (actually what I did to solve my problem) but why should I have to go through the ceremony of creating a class which only implements an interface since C# offers dynamic types?
  • 1
  • 0
  • 211
  • 40

Add your comment

Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (1)

Voters Against This Link (0)

    Apache Hadoop
    Written by: Piotr Krewski
    Featured Refcardz: Top Refcardz:
    1. Play
    2. Akka
    3. Design Patterns
    4. OO JS
    5. Cont. Delivery
    1. Play
    2. Java Performance
    3. Akka
    4. REST
    5. Java