summaryrefslogtreecommitdiff
path: root/CSharp/Ivy/IvyPPC
diff options
context:
space:
mode:
Diffstat (limited to 'CSharp/Ivy/IvyPPC')
-rw-r--r--CSharp/Ivy/IvyPPC/IvyBinding.cs13
1 files changed, 4 insertions, 9 deletions
diff --git a/CSharp/Ivy/IvyPPC/IvyBinding.cs b/CSharp/Ivy/IvyPPC/IvyBinding.cs
index 1ff96e5..09e22c9 100644
--- a/CSharp/Ivy/IvyPPC/IvyBinding.cs
+++ b/CSharp/Ivy/IvyPPC/IvyBinding.cs
@@ -1,6 +1,5 @@
using System;
using System.Collections;
-using System.Collections.Specialized;
using System.Text.RegularExpressions;
namespace IvyBus
@@ -39,13 +38,11 @@ namespace IvyBus
if (result.Success)
{
// Start at 1 because group 0 represent entire matching
- StringCollection coll = new StringCollection();
+ args = new string[result.Groups.Count-1];
for (int sub = 1; sub < result.Groups.Count; sub++)
{
- coll.Add(result.Groups[sub].Value);
+ args[sub-1] = result.Groups[sub].Value;
}
- args = new string[coll.Count];
- coll.CopyTo(args, 0);
}
return args;
}
@@ -91,13 +88,11 @@ namespace IvyBus
if (msgtag == msgname)
{
- StringCollection coll = new StringCollection();
+ args = new string[msgargs.Length];
for( int sub= 0; sub < msgargs.Length; sub++)
{
- coll.Add((string)args_values[msgargs[sub]]);
+ args[sub] = (string)args_values[msgargs[sub]];
}
- args = new string[coll.Count];
- coll.CopyTo(args, 0);
}
return args;
}