Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Bug in VA Outline (C# expression-bodied methods)

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
StickyBit Posted - Mar 03 2019 : 04:05:00 AM
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:



3   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Mar 06 2019 : 12:46:19 PM
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.
StickyBit Posted - Mar 05 2019 : 08:33:31 AM
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
}
feline Posted - Mar 04 2019 : 11:05:34 AM
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.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000