(T)Convert.ChangeType(value, typeof(T));
https://stackoverflow.com/questions/732677/converting-from-string-to-t
Converting from String to <T>
I really should be able to get this, but I'm just to the point where I think it'd be easier to ask. In the C# function: public static T GetValue<T>(String value) where T:new() { //Magic
stackoverflow.com
'java' 카테고리의 다른 글
6자리 인증번호 생성 예제 (0) | 2021.03.21 |
---|---|
generic 설명 (0) | 2021.03.19 |
duration과 period (0) | 2020.11.23 |
sha256 암호화 (0) | 2020.11.11 |
java mail 발송시 첨부파일 한글 깨짐 현상 (0) | 2020.10.23 |