SerializeExtendWriteJsonFile Method
寫入Json格式檔案
Namespace: eBizprise.FrameworkAssembly: eBizprise.Framework.SerializeHelper (in eBizprise.Framework.SerializeHelper.dll) Version: 25.0.0.0+adf38c4ccb2bf98d8ad258a6278302b5e05a94ed
public static void WriteJsonFile(
this Object sourceObject,
string filePath,
string fileName
)
- sourceObject Object
- 來源物件
- filePath String
- 檔案路徑
- fileName String
- 檔案名稱
In Visual Basic and C#, you can call this method as an instance method on any object of type
Object. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
TestClass testClass = new TestClass() { DecimalColumn = (decimal)3.3, IntColumn = 2, StringColumn = "Data" };
testClass.WriteJsonFile("C:\Temp", "Test.json");
///
/// 測試類別
///
class TestClass
{
///
/// 文字欄位
///
public string StringColumn { get; set; }
///
/// 整數欄位
///
public int IntColumn { get; set; }
///
/// 數字欄位
///
public decimal DecimalColumn { get; set; }
///
/// 二進位欄位
///
public byte[] ByteColumn { get; set; }
}
| Date | Version | Description |
|---|
| 2020/04/14 | 1.0.2.0 | 增加寫入Json檔案功能 |
| 2025/09/19 | 25.0.0.0 | 彙整2025年度初版 |