Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- IResourcePolicy irp(instantiated interface)
- irp.WrmVersion = "10.4";
- public interface IResourcePolicy
- {
- string Version
- {
- get;
- set;
- }
- }
- public interface IResourcePolicy
- {
- string Version { get; set; }
- }
- public class ResourcePolicy : IResourcePolicy
- {
- public string Version { get; set; }
- }
- class MyResourcePolicy : IResourcePolicy {
- private string version;
- public string Version {
- get {
- return this.version;
- }
- set {
- this.version = value;
- }
- }
- }
- using System;
- interface IName
- {
- string Name { get; set; }
- }
- class Employee : IName
- {
- public string Name { get; set; }
- }
- class Company : IName
- {
- private string _company { get; set; }
- public string Name
- {
- get
- {
- return _company;
- }
- set
- {
- _company = value;
- }
- }
- }
- class Client
- {
- static void Main(string[] args)
- {
- IName e = new Employee();
- e.Name = "Tim Bridges";
- IName c = new Company();
- c.Name = "Inforsoft";
- Console.WriteLine("{0} from {1}.", e.Name, c.Name);
- Console.ReadKey();
- }
- }
- /*output:
- Tim Bridges from Inforsoft.
- */
- private string version = "10.4';
Add Comment
Please, Sign In to add comment