Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Smart Suggestions went wild

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
Uniwares Posted - Mar 10 2020 : 07:59:37 AM
Really no idea what happened here...

The type of "Folders" is List<string>, so it should suggest it (as it did correctly for the "Files" right above)







6   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Mar 12 2020 : 06:41:14 AM
The problem with the C# initializers is actually covered by

case=24121

and we are hoping to have a fix fairly soon, but I don't currently have a solid estimate for when.
Uniwares Posted - Mar 11 2020 : 1:36:20 PM
Yeah, C# is changing faster than Smartphone technology, hahahahahaha.
feline Posted - Mar 11 2020 : 1:33:44 PM
I think this is caused by us not properly understanding the C# syntax here, so I have put the examples into:

case=962
feline Posted - Mar 10 2020 : 2:49:27 PM
Thank you for explaining, I have reproduced this here now. Trying to pin down the extent of the problem now.
Uniwares Posted - Mar 10 2020 : 12:11:41 PM
Its a valid initializer. Files and Folders are members of the BackupPlanFilesAndFolders class, thus they are initialized inline.

	x.FilesAndFolders = new List<BackupPlanFilesAndFolders>
	{
		new BackupPlanFilesAndFolders()
		{
			Files = new List<string>(),
			Folders = new List<string>()
		}
	};

is equivalent to
	x.FilesAndFolders = new List<BackupPlanFilesAndFolders>();
	x.FilesAndFolders.Add(new BackupPlanFilesAndFolders());
	x.FilesAndFolders[0].Files = new List<string>();
	x.FilesAndFolders[0].Folders = new List<string>();

The (simplified) class definition:

class BackupPlanFilesAndFolders
{
	public List<string> Files;
	public List<string> Folders;
}


Maybe the fact that its an inline initializer inside an inline initializer (List<> and the class) but that actually shouldnt make any difference, after all its normal use.
feline Posted - Mar 10 2020 : 11:55:36 AM
That's different...

On the line above, the "Files" line, it ends with a comma. Is this deliberate? This doesn't look like valid syntax to me, but you might well be doing something that I am not used to. If this is a mistake, if you replace the comma with a semi-colon, and give VA a moment to catch up, does this change the suggestion for "Folders"?

I am wondering if the line above is confusing our parser, resulting in this rather unhelpful suggestion.

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