25개 이상의 토픽을 선택하실 수 없습니다.
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- using Newtonsoft.Json;
- using System;
- using System.Collections.Generic;
- using System.Text;
-
- namespace HKLib
- {
- public static class HKExpandMethod
- {
- public static bool TryFromJSON<T>(this string str, out T source)
- {
- try
- {
- source = JsonConvert.DeserializeObject<T>(str);
- return true;
- }
- catch (Exception ex)
- {
- source=default(T);
- return false;
- }
- }
- }
- }
|