ClassLibrary Interface Example

  • Thread starter Thread starter Tom Roach
  • Start date Start date
T

Tom Roach

Can someone show a (very!) simple C# example class that would implement the
following interface so that MyString could then be written/read from a VB
application?

interface MyInterface

{

string MyString

{

get;

set;

}

}


Thanks for your help!
 
This compiles:

interface MyInt {

string MyStr {

get;

set;

}

}

public class MyCls : MyInt {

public string MyStr {

get {

return "";

}

set {

Console.WriteLine("Value passed: {0}",value);

}

}

}



HTH

Alex
 
Back
Top