Permalink
Browse files

Replace char arrays with string arrays.

As described in http://blog.renttalent.dk/2010/09/what-is-msil-privateimplementationdetai.html, char arrays are compiled to special types which throws a TypeLoadException with the ILMirror on Windows.
  • Loading branch information...
1 parent 31d6619 commit 9902de785b9aaa0fb941bdf878fc84f9d93a4d4b polyethene committed Nov 18, 2011
Showing with 6 additions and 6 deletions.
  1. +6 −6 Rusty/Core/Gui/Gui.cs
View
@@ -409,7 +409,7 @@ public static void Gui(string Command, string Param2, string Param3, string Para
else if (mode.StartsWith(Keyword_MinSize))
{
arg = mode.Substring(Keyword_MinSize.Length);
- parts = arg.Split(new[] { 'x', 'X', '*' }, 2);
+ parts = arg.Split(new[] { "x", "X", "*" }, 2, StringSplitOptions.None);
size = guis[id].MinimumSize;
if (parts.Length > 0 && int.TryParse(parts[0], out n))
@@ -422,7 +422,7 @@ public static void Gui(string Command, string Param2, string Param3, string Para
else if (mode.StartsWith(Keyword_MaxSize))
{
arg = mode.Substring(Keyword_MaxSize.Length);
- parts = arg.Split(new[] { 'x', 'X', '*' }, 2);
+ parts = arg.Split(new[] { "x", "X", "*" }, 2, StringSplitOptions.None);
size = guis[id].MaximumSize;
if (parts.Length > 0 && int.TryParse(parts[0], out n))
@@ -550,7 +550,7 @@ static void GuiControlEdit(ref Control control, Form parent, string type, string
default:
if (mode.StartsWith(Keyword_Range))
{
- string[] range = mode.Substring(Keyword_Range.Length).Split(new[] { '-' }, 2);
+ string[] range = mode.Substring(Keyword_Range.Length).Split(new[] { "-" }, 2, StringSplitOptions.None);
decimal n;
if (decimal.TryParse(range[0], out n))
@@ -939,7 +939,7 @@ static void GuiControlEdit(ref Control control, Form parent, string type, string
default:
if (mode.StartsWith(Keyword_Range))
{
- string[] range = mode.Substring(Keyword_Range.Length).Split(new[] { '-' }, 2);
+ string[] range = mode.Substring(Keyword_Range.Length).Split(new[] { "-" }, 2, StringSplitOptions.None);
if (range[0].Length != 0)
date.MinDate = ToDateTime(range[0]);
@@ -988,7 +988,7 @@ static void GuiControlEdit(ref Control control, Form parent, string type, string
default:
if (mode.StartsWith(Keyword_Range, StringComparison.OrdinalIgnoreCase))
{
- string[] range = mode.Substring(Keyword_Range.Length).Split(new[] { '-' }, 2);
+ string[] range = mode.Substring(Keyword_Range.Length).Split(new[] { "-" }, 2, StringSplitOptions.None);
if (!string.IsNullOrEmpty(range[0]))
cal.MinDate = ToDateTime(range[0]);
@@ -1044,7 +1044,7 @@ static void GuiControlEdit(ref Control control, Form parent, string type, string
else if (mode.StartsWith(Keyword_Range))
{
mode = mode.Substring(Keyword_Range.Length);
- string[] parts = mode.Split(new[] { '-' }, 2);
+ string[] parts = mode.Split(new[] { "-" }, 2, StringSplitOptions.None);
if (parts[0].Length != 0 && int.TryParse(parts[0], out n))
slider.Minimum = n;

0 comments on commit 9902de7

Please sign in to comment.