Skip to content Skip to sidebar Skip to footer
Showing posts with the label C#

CA1062: ValidateArgumentsOfPublicMethods On Co-constructor Calls

Answer : Like this? public MyClass(SomeOtherClass source) : this(source, source == null ? null… Read more CA1062: ValidateArgumentsOfPublicMethods On Co-constructor Calls

AutoEllipsis=true Affects The Vertical Positioning Of The Text

Answer : I see it. This looks like a limitation in the underlying winapi, DrawTextEx(). Which … Read more AutoEllipsis=true Affects The Vertical Positioning Of The Text

C#: Looping Through Lines Of Multiline String

Answer : I suggest using a combination of StringReader and my LineReader class, which is part … Read more C#: Looping Through Lines Of Multiline String

Collapse All #regions Only(!) In C# (Visual Studio)

Answer : in Visual Studio 2017 I have to activate 'Collapse #regions when collapsing to defi… Read more Collapse All #regions Only(!) In C# (Visual Studio)

Assign Null To A SqlParameter

Answer : The problem is that the ?: operator cannot determine the return type because you are e… Read more Assign Null To A SqlParameter

Collapse Grid Row In WPF

Answer : All you need is something to cache the height(s) of the visible row. After that, you no… Read more Collapse Grid Row In WPF

C# WPF - ScrollViewer + TextBlock Troubles

Answer : This works: <Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/prese… Read more C# WPF - ScrollViewer + TextBlock Troubles

C# Parameterized Query MySQL With `in` Clause

Answer : This is not possible in MySQL. You can create a required number of parameters and do UP… Read more C# Parameterized Query MySQL With `in` Clause