]> wagnertech.de Git - mDoc.git/blobdiff - csharp/mutil/ReturnCode.cs
csharp-s6g
[mDoc.git] / csharp / mutil / ReturnCode.cs
diff --git a/csharp/mutil/ReturnCode.cs b/csharp/mutil/ReturnCode.cs
new file mode 100644 (file)
index 0000000..7702231
--- /dev/null
@@ -0,0 +1,21 @@
+using System;
+
+namespace mutil {
+
+    public class ReturnCode {
+        public const int OK = 0;
+        public const int FileNotFound = 1;
+
+        int RC;
+        public ReturnCode(int RC) {
+            this.RC = RC;
+        }
+        override public string ToString() {
+            switch (this.RC) {
+                case OK          : return "OK";
+                case FileNotFound: return "FileNotFound";
+                default: throw new System.Exception("Unknown RC: " + Convert.ToString(this.RC));
+            }
+        }
+    }
+}
\ No newline at end of file