diff options
author | abrevet-dev <57099550+abrevet-dev@users.noreply.github.com> | 2019-12-03 23:38:38 +0300 |
---|---|---|
committer | Alexander Köplinger <alex.koeplinger@outlook.com> | 2019-12-03 23:38:38 +0300 |
commit | 174f2f6a70084eced80d4c0284b0a9eb2cf25432 (patch) | |
tree | 5cf234d2b3f83a290dbb6074d066e5c246da28db /mcs | |
parent | 8150a38dae6fbf60a8a5ffc20a1d07b911fbc31b (diff) |
[WinForms] SetRowSpan and SetColumnSpan does not trigger the good exception. (#18002)
According to .Net documentation:
Exceptions
ArgumentOutOfRangeException
value is less than 1.
Diffstat (limited to 'mcs')
-rw-r--r-- | mcs/class/System.Windows.Forms/System.Windows.Forms/TableLayoutSettings.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/TableLayoutSettings.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms/TableLayoutSettings.cs index 9ff8e33e475..1eba622e6b2 100644 --- a/mcs/class/System.Windows.Forms/System.Windows.Forms/TableLayoutSettings.cs +++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/TableLayoutSettings.cs @@ -284,8 +284,8 @@ namespace System.Windows.Forms { if (control == null) throw new ArgumentNullException (); - if (value < -1) - throw new ArgumentException (); + if (value < 1) + throw new ArgumentOutOfRangeException (); column_spans[control] = value; @@ -310,8 +310,8 @@ namespace System.Windows.Forms { if (control == null) throw new ArgumentNullException (); - if (value < -1) - throw new ArgumentException (); + if (value < 1) + throw new ArgumentOutOfRangeException (); row_spans[control] = value; |