123456789101112131415161718192021222324252627282930313233343536 |
- using System;
- using System.Collections.Generic;
- using System.IO;
- using System.Linq;
- using System.Runtime.Serialization.Formatters.Binary;
- using System.Runtime.Serialization;
- using System.Text;
- using System.Threading.Tasks;
- namespace Venus_MainPages.Unity
- {
- public static class CommonFunction
- {
- //internal T
- public static T GetValue<T>(Dictionary<string, object> RtDataValues, string str)
- {
- if (RtDataValues.Keys.Contains(str))
- {
- try
- {
- return (T)Convert.ChangeType(RtDataValues[str], typeof(T));
- }
- catch
- {
- return default(T);
- }
- }
- else
- {
- return default(T);
- }
- }
- }
- }
|