Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 Bug in VA Outline (C# expression-bodied methods)
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

StickyBit
New Member

2 Posts

Posted - Mar 03 2019 :  04:05:00 AM  Show Profile  Reply with Quote
Assume in my C# project I have code like that:



If I right-click on method
protected bool Equals(VisitRecord other)
(which has lambda-like expression bodied syntax) in VA Outline and then click "Select in Editor", only the
protected bool Equals(VisitRecord other)  =>
part will be selected but not the whole method body.

If I then try to move method by drag'n'drop to change it's location in file, the code will turn into uncompilable mess:



feline
Whole Tomato Software

United Kingdom
18749 Posts

Posted - Mar 04 2019 :  11:05:34 AM  Show Profile  Reply with Quote
I am seeing the same problem here, thank you for the very clear example:

case=137381

For now you are going to have to move these expression-bodied functions manually, rather than using VA Outline.

zen is the art of being at one with the two'ness
Go to Top of Page

StickyBit
New Member

2 Posts

Posted - Mar 05 2019 :  08:33:31 AM  Show Profile  Reply with Quote
Thank you for the quick response.

Please consider that in C# not only methods but also read-only properties and read-only indexers can have the same syntax, for example:

class Widget
{
   public int GetValue() => 0; //method
   public int Value => 0; //property
   public int this[int i] => i; //indexer
}

Edited by - StickyBit on Mar 05 2019 08:36:42 AM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18749 Posts

Posted - Mar 06 2019 :  12:46:19 PM  Show Profile  Reply with Quote
In theory these should be correctly handled and supported.

But, since the first bug is specific to having them spread out over more than one line... yep, VA also gets confused here as well. Thank you for bringing this up, I have added this to the case. It's hopefully less likely with such simple situations, but there are bound to be some times when multi-line code makes sense here.

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000