C# accesors in Visio

D

David Dvali

Hello.
How can I implement C# class accesors in Visio 2003?
Here is the class code in C# for example:

public class Person {
private int id;
private string forename;
private string surname;

public int Id {
get { return this.id; }
}

public string Forename {
get { return this.forename; }
set { this.forename = value; }
}

public string Surname {
get { return this.surname; }
set { this.surname = value; }
}
}
 
C

Chris

Not sure what you mean. You can just build your own "wrapper class"...

class MyShape {

private Visio.Shape _visShape

public void new( Visio.Shape visShape ) {
_visShape = visShape
}

public double simpleArea() {
return _visShape.CellsU("Width").ResultIU *
_visShape.CellsU("Height").ResultIU
}

}

Hope this helps,

Chris Roth
Visio MVP
 

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

Top