merge fix for: https://issues.apache.org/jira/browse/AMQNET-399
diff --git a/src/main/csharp/NetTxConnection.cs b/src/main/csharp/NetTxConnection.cs
index b7918cd..ddca599 100644
--- a/src/main/csharp/NetTxConnection.cs
+++ b/src/main/csharp/NetTxConnection.cs
@@ -76,10 +76,10 @@
string[] parts = resId.Split(":-".ToCharArray());
// We don't use the hostname here, just the remaining bits.
- int a = Int32.Parse(parts[1]);
- short b = Int16.Parse(parts[3]);
- short c = Int16.Parse(parts[4]);
- byte[] d = System.BitConverter.GetBytes(Int64.Parse(parts[2]));
+ int a = Int32.Parse(parts[parts.Length-4]);
+ short b = Int16.Parse(parts[parts.Length-2]);
+ short c = Int16.Parse(parts[parts.Length-1]);
+ byte[] d = System.BitConverter.GetBytes(Int64.Parse(parts[parts.Length-3]));
return new Guid(a, b, c, d);
}