From d8ab78d769a5241e5b294c4723036a73f2af9111 Mon Sep 17 00:00:00 2001 From: jbtule Date: Fri, 15 Nov 2019 10:10:12 -0600 Subject: [PATCH] type properties on unsupported fields will return object. --- .gitignore | 1 + DotNetDBF/DBFFieldType.cs | 3 +-- DotNetDBF/Utils.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index c051ffc..bb8f42b 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ obj *.user .idea/* +.vs/* \ No newline at end of file diff --git a/DotNetDBF/DBFFieldType.cs b/DotNetDBF/DBFFieldType.cs index 60f3dee..ca00e73 100644 --- a/DotNetDBF/DBFFieldType.cs +++ b/DotNetDBF/DBFFieldType.cs @@ -59,8 +59,7 @@ public static DbType FromNative(NativeDbType @byte) case NativeDbType.Memo: return DbType.AnsiString; default: - throw new DBFException( - $"Unsupported Native Type {@byte}"); + return DbType.Object; } } diff --git a/DotNetDBF/Utils.cs b/DotNetDBF/Utils.cs index 4fb1d7d..b49d850 100644 --- a/DotNetDBF/Utils.cs +++ b/DotNetDBF/Utils.cs @@ -168,7 +168,7 @@ public static Type TypeForNativeDBType(NativeDbType aType) case NativeDbType.Memo: return typeof(MemoValue); default: - throw new ArgumentException("Unsupported Type"); + return typeof(Object); } } }