I am working on Windows 8 Phone application,I have 2 things here one is Library project and other is normal app,Let me first explain my code:
In Library project<
Now I understand, you want to call overriden values from your project in your library.
You cannot do that with classical C# mechanisms, for that you need dependency injection. Something along these lines:
// library
public interface IA
{
List ListOfEmployees();
}
public class ABase : IA
{
public virtual List ListOfEmployees() {}
}
public static class Repository
{
private static IA _a;
public static IA A
{
get { return _a = _a ?? new ABase(); }
set { _a = value; }
}
}
// in your app
class Properties : ABase
{
public override List ListOfEmployees() { /* ... */ }
}
Repository.A = new Properties();