Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I initially posted this question in Stack Overflow, but I have a feeling that I should have posted here instead.

In my Visio 2007 UML document I am unable to figure out how I can add an operation to an Interface that returns a generic List<MyCustomType> type.

For example:

Say I have a class named "MyClass" and an Interface named "IFace". IFace has a signature of a method that returns a Generic List of MyClass.

For clarity, here's an example of the C# code:

namespace StackO
{
    public interface IFace
    {
        List<MyClass> SomeMethod(string data);    
    }

    public class MyClass
    {
    }
}

Here's a screenshot of where I'm stuck: enter image description here

It seems as though the only way to specify a List<MyClass> as my Return Type is to create another user-defined datatype that is explicitly written as List<MyClass>. If this is the case, so be it. However, I'm posting this in hopes that there is a better/proper way to do this.

How can I define the Return Type of an Operation of a Visio Interface to be a Generic List of a User-Defined Datatype?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

I received a sufficient answer from my post over at Stack Overflow:

There is a tip for handling this.

in the Class diagram properties > Go to operations > select the return type you are interested in changing and click properties.

in the next dialog you will have option for setting prefix (List< ) and suffix (>).

This way you can specify the return type as List<>.

I see this option in 2010. But I am not sure this option is available in Visio 2007.

I hope this helps.

Regards, Ramana Akula.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.