Welcome to MSDN Blogs Sign in | Join | Help

Sara Ford's Weblog

My adventures embracing open source on CodePlex and at Microsoft

News

    • Did you know... All author proceeds go directly to sending Hurricane Katrina survivors to college.

      Microsoft Visual Studio Tips book

      Recent Entries

Did you know… You can Invoke a Static Method from the Class View? - #352

Today’s tip is actually a continuation from yesterday’s, as the Create Instance and Invoke Static Method actually are a part of the Class Diagram implementation. I don’t know too much about the Class Diagram, so I’ll just write a quick tip that these method exists and here’s the Invoke Static Method command in action.

Invoke Static Method on the Class View context menu

When I run the Invoke Static Method command on the SayHello() method, I’m prompted whether to run the method.

Invoke Method message box

Pressing Okay launching the command prompt window.

Hello World in Command Prompt

when terminating the command prompt (I have a Console.Read() going on here, so i press Enter to finish executing the method), another prompt appears that everything succeeded.

Method Call Executed Successfully message box

But if it didn’t (by closing the command prompt so that the Console.Read() never finished), I get this message box instead.

Method Invoke Failed message box

Technorati Tags: ,

Please note I’m taking a real vacation and won’t be able to moderate comments until I get back mid next week.

Posted: Friday, November 07, 2008 3:00 AM by saraford

Comments

xjb said:

# April 3, 2009 9:42 AM
New Comments to this post are disabled
Page view tracker