Comment by Sinatr on Why does the C# compiler choose Dapper's extension...
"When I call" - you are calling extension method yourself. To call instance method you need the instance of that type first, not some interface it implements.
View ArticleComment by Sinatr on Meaning of statement "_ = string.Empty;"
_ is likely a variable (it's legitimate variable name, try it), could be a discard.
View ArticleComment by Sinatr on Update MDI parent ToolStripStatusLabel text from another...
The error is thrown by ShowDialog and not by the line you show (it's totally irrelevant what you are doing later). The error tells you not to set the form parent. Use ShowDialog overload with...
View ArticleComment by Sinatr on How do I switch Keyboard Focus between the Main- and a...
Then there is a work left to do. Start here.
View ArticleComment by Sinatr on Can I make my custom indexer work like the array indexer?
position has nothing to do with indexer, it's a non-existing member of Item. Can you elaborate? Please post a complete minimal reproducible example with code producing error and the complete error.
View ArticleComment by Sinatr on Can I make my custom indexer work like the array indexer?
Making Item a class is another option.
View ArticleComment by Sinatr on How to use an injected variable as a default parameter?
You can add method overload without rootFolderId, which obtains its value from passed configuration and calls original method.
View ArticleComment by Sinatr on How to make VisualStudio autoformat a whitespace after...
Why? This will affect source-code readability for (almost) any C# developers. Rather than trying to format a new language sources to what you are used to, try to get used to C# default formatting.
View ArticleComment by Sinatr on Serialise base class properties first in System.Text.Json
Use record for DTO. I find record syntax pretty cool.
View ArticleComment by Sinatr on How can I stop these extra bytes being inserted when I...
@PanagiotisKanavos, encoding is changed to UTF16, how can I reproduce OP problem?
View ArticleComment by Sinatr on Listview not updating when bound observablecollection...
Look like a typo: OnPropertyChanged(nameof(machineFamilies)); - use OnPropertyChanged() or specify property name (not a field name).
View ArticleComment by Sinatr on Listview not updating when bound observablecollection...
Look like a typo: OnPropertyChanged(nameof(machineFamilies)); - use OnPropertyChanged() or specify property name (not a field name).
View ArticleComment by Sinatr on Can I access the Form after ShowDialog returned?
I suspect the question is rather "what could go wrong"? You are safe as long as you are not doing anything what require window handle (which is destroyed after) or indirectly message pump (e.g....
View ArticleComment by Sinatr on Why do I get an "incorrect key" result when launching a...
The echo Incorrect key is executed because the condition in if statement is evaluated as false.
View ArticleComment by Sinatr on Designer set property in WinForm App reverting to...
You don't really need to see control fully initialized in design time, so don't set the size, docking, whatever using designer. Rather check if it's a run-time and then initialize control as you wish....
View ArticleComment by Sinatr on Canvas perfomance on Wpf
Less than thousand elements? Check with Profiler if reason is not something stupid, like binding to very expensive property, which reads the file.
View ArticleComment by Sinatr on How to remove suggestions from VS?
The Tab suggesions are learned after repeating same thing several times. They are quite useful. But yours are not looking like mine, could it be an extension to VS or some specific programming...
View ArticleComment by Sinatr on C# Program Ignores Existing .txt File — How to Debug...
"how I can troubleshoot it further?" - debug it : set breakpoints, run, inspect variables/call stack, do step-over/-into until something unexpected happens, which means you found a bug.
View ArticleComment by Sinatr on User interface freezes during data parsing through async...
The majority of work seems to be done in UI thread, which is a problem. Move operations with UI controls out of parse method. Call method synchronously in ThreadProc and invoke only text assignment...
View Article