|
|
Rank: Newbie Groups: Member
Joined: 8/20/2008 Posts: 1 Points: 3 Location: Georgia
|
Hi, I try to use tostr and get the following msg. Any solutions? Thanks a lot.
Error executing command 'ToString', command line 'tostr'. Can't find element 'vsCMElementClass' from current position. Try positioning cursor inside a valid code element (class, method, etc.)
|
|
Rank: Administration Groups: Administration
Joined: 3/16/2008 Posts: 22 Points: 72 Location: Spain
|
The error message seems like the cursor is not inside a class.
Try executing the command inside a a class but outside any method o property. Example:
public class MyClass { public int X { get { return x; } }
// Locate cursor here and execute "tostr <ctrl+enter>" }
|
|
Rank: Newbie Groups: Member
Joined: 9/3/2008 Posts: 1 Points: 3 Location: Houston, TX
|
Quote:The error message seems like the cursor is not inside a class.
Try executing the command inside a a class but outside any method o property. Example:
public class MyClass { public int X { get { return x; } }
// Locate cursor here and execute "tostr <ctrl+enter>" } This is a minor bug I guess, but even following these instructions, if there are no public properties in the class, tostr still generates an error. In this case: Quote:Error executing command 'ToString', command line 'tostr'. Object reference not set to an instance of an object. Some code however is generated.
|
|
Rank: Administration Groups: Administration
Joined: 3/16/2008 Posts: 22 Points: 72 Location: Spain
|
Thanks for reporting the error.
I'll fix it for the next release.
|
|
|
Guest |