c 實用工具方法 壹

2021-08-24 20:39:41 字數 1222 閱讀 2941

/// /// 字典轉key=value

///

///

///

public static string getparamsrc(dictionaryparamsmap)

var result = str.tostring().substring(0, str.tostring().length - 1);

return result;

}/// /// 物件轉換為字典

///

/// 待轉化的物件

/// 是否忽略null 這裡我不需要轉化null的值,正常使用可以不穿引數 預設全轉換

///

public static dictionaryobjecttomap(object obj, bool isignorenull = false)

) != null || !isignorenull)

)); // 向字典新增元素}}

}return map;

}/// /// 獲取時間戳

///

///

public static long gettimespan()

/// /// unicode轉字串

///

/// 經過unicode編碼的字串

/// 正常字串

public static string unicode2string(string source)

)", regexoptions.ignorecase | regexoptions.compiled).replace(

source, x => string.empty + convert.tochar(convert.touint16(x.result("$1"), 16)));

}/// /// 物件轉化為key=value

linux實用工具

基本實用工具 ls 顯示檔名 list cat 顯示文字檔案內容 rm i 刪除檔案 remove i開啟選項 less more 分屏顯示檔案 hostname 顯示系統名 檔案操作 cp sourcefile destinationfile 複製檔案copy mv oldname newname...

Linux實用工具

特殊字元 轉義字元可以用 括起來,也可以在前面加上 基礎的一些命令 列出檔名 ls 顯示檔案文字內容 cat 刪除檔案 rm 顯示系統名 hostname 複製檔案 cp 更改檔名 mv 列印檔案 lpr 查詢字串 grep 顯示頭,尾檔案 head,tail 按順序顯示檔案內容 sort 刪除檔案...

sqlcmd 實用工具

使用 sqlcmd 實用工具可以在命令提示符處輸入 transact sql 語句 系統過程和指令碼檔案。此實用工具使用 ole db 執行 transact sql 批處理。sqlcmd e s server name instance name h wksta name d db name l ...