こんにちは。
Windows10でアプリケーションを開発しています。
Visual Studio 2015 Communityを使っています。
###実現したいこと
Properyの設定方法を教えてください。
###発生している問題・エラーメッセージ
getのところで、abstract、extern、またはpartialに指定されていないため、本体を宣言する必要があります。
###該当のソースコード
C#
1 public static string ReadJSON(string jsonstring) { 2 string log = ""; 3 try { 4 List<ChatWorkTaskClass> cwtasks = JsonConvert.DeserializeObject<List<ChatWorkTaskClass>>(jsonstring); 5 foreach (ChatWorkTaskClass task in cwtasks) { 6 log += "●" + task.limit_time + task.body + "\r\n"; 7 } 8 } 9 catch (Exception exception) { 10 string error = exception.Message; 11 } 12 return log; 13 } 14 } 15} 16 17public class ChatWorkTasks { 18 public List<ChatWorkTaskClass> ChatWorkProperty { get; set; } 19} 20 21public class ChatWorkTaskClass { 22 public int task_id { get; set; } 23 public Account account { get; set; } 24 public Account assigned_by_account { get; set; } 25 public int message_id { get; set; } 26 public string body { get; set; } 27 //public int limit_time_int { 28 // get; 29 // set { 30 // limit_time = DateTime.Parse(limit_time_int.ToString()); 31 // } 32 //} 33 //public DateTime limit_time { get; set; } 34//limit_timeに入っているのはUnixTimeなので、Propertyを使ってDateTimeにPerseしたい。 35 36 public int limit_time { get; set; } 37 public string status { get; set; } 38} 39
###補足情報(言語/FW/ツール等のバージョンなど)
Microsoft Visual Studio Community 2015
Version 14.0.25424.00 Update 3
Microsoft .NET Framework
Version 4.6.01038
インストールしているバージョン:Community
Visual C# 2015 00322-20000-00000-AA575
Microsoft Visual C# 2015
です。
よろしくお願いします。

回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/10/10 13:18