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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top