JSONファイルからC#でクラスを作成する

jchornsey

私はC#に非常に慣れていませんが、何年も前にVBで少し手を加えました。

複数行のテキストボックスを使用して基本的なWindowsフォームを作成し、テキストファイルの内容をテキストボックスに書き込んでいます。

public Form1()
    {
        InitializeComponent();

        List<string> lines = File.ReadAllLines(@"X:\Log Files\01.log").ToList();

        lines.ForEach(l => {

            textBox1.AppendText(l);
            textBox1.AppendText(Environment.NewLine);
                    });

    }

実際にファイルの内容を読んでいることがわかるように、これを行いました。私は知っています...あなたは皆、この驚くべきスキルに非常に感銘を受けています。

それで、ここにテキストファイルからのいくつかの行があります:

{ "timestamp":"2020-01-03T00:20:22Z", "event":"Rank", "Rank1":3, "Rank2":8 }
{ "timestamp":"2020-01-03T00:20:22Z", "event":"Progress", "Task1":56, "Task2":100 }
{ "timestamp":"2020-01-03T00:20:22Z", "event":"Reputation", "Nation":75.000000, "State":75.000000 }
{ "timestamp":"2020-01-03T00:20:27Z", "event":"Music", "MusicTrack":"NoTrack" }

イベントタイプに基づいてオブジェクトを作成したい。何かのようなもの:

   public Progress(int time, int t1, int t2)
   {
        this.timestamp = time;  //'time' is the timestamp value from the line
        this.task1 = t1;        //'t1' is the Task1 value from the line
        this.task2 = t2;        //'t2' is the Task2 value from the line
   }

ファイルを読み取るとき、eventフィールドを取得し、それを使用してインスタンス化するクラスを決定します。timestampその行forは保持され、各イベントのフィールドはクラスのプロパティとして入力されます。

Newtonsoft.JsonVisual Studioにインストールましたが、これにはネイティブにこれを行う機能があると思います。

しかし、これを行う方法はドキュメントではわかりません。

誰かが私を正しい方向に向けてくれませんか?

ありがとう!

Joel Wiklund

このコードは私のマシンで動作します。あなたは、イベントサブクラス(から派生したものを追加する必要がありBaseEvent、すなわちRankEvent、あなたの.logファイル内のすべての追加のイベントのために)ともにプロパティを追加するJsonEventこれらのクラスとに値を追加EventTypeして更新しますswitch statement

私がこれをした方法:

  1. .logファイルから各行をコピーしました
  2. つまり、 { "timestamp":"2020-01-03T00:20:22Z", "event":"Rank", "Rank1":3, "Rank2":8 }
  3. 私が行ったこことC#クラスを取得するには、左側のウィンドウに行を貼り付け、その後、私は、結合作成したJsonEventすべての行からクラスを。
  4. 各解析ループの後、一部のプロパティがnullになるためプリミティブ型を null可能にしまし
  5. BaseEvent共通のプロパティを持つ基本クラスを作成しました(この場合はTimestamp
  6. BaseEventイベントごとにのサブクラスを作成しました。RankEvent
  7. プロパティEventTypeを解析するためにイベント列挙型を作成しました"event"
  8. すべての行をループしました。各行について、その行をJsonEvent C#クラス(jsonEvent)に逆シリアル化し、を調べて、EventType作成するサブクラスを確認しました。
  9. ループごとに、サブクラス(newEventを解析/逆シリアル化して次のリストにしました。List<BaseEvent> eventList
  10. ループが完了すると、eventList変数が設定され、プログラムの残りの部分で使用できるようになります。
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.Serialization;

namespace StackOverFlow
{
    public class Program
    {
        static void Main(string[] args)
        {
            var file = @"X:\Log Files\01.log";
            var eventList = ParseEvents(file);
            //TODO Do something
        }

        private static List<BaseEvent> ParseEvents(string file)
        {
            //TODO Encapsulate in a try & catch and add a logger for error handling
            var eventList = new List<BaseEvent>();
            var lines = File.ReadAllLines(file).ToList();
            foreach (var line in lines)
            {
                var jsonEvent = JsonConvert.DeserializeObject<JsonEvent>(line);
                BaseEvent newEvent;
                switch (jsonEvent.EventType)
                {
                    case EventType.Rank:
                        newEvent = new RankEvent(jsonEvent);
                        eventList.Add(newEvent);
                        break;
                    case EventType.Progress:
                        newEvent = new ProgressEvent(jsonEvent);
                        eventList.Add(newEvent);
                        break;
                    case EventType.Reputation:
                        newEvent = new ReputationEvent(jsonEvent);
                        eventList.Add(newEvent);
                        break;
                    case EventType.Music:
                        newEvent = new MusicEvent(jsonEvent);
                        eventList.Add(newEvent);
                        break;

                    //TODO Add more cases for each EventType

                    default:
                        throw new Exception(String.Format("Unknown EventType: {0}", jsonEvent.EventType));
                }
            }

            return eventList;
        }
    }

    //TODO Move classes/enums to a separate folder

    [JsonConverter(typeof(StringEnumConverter))]
    public enum EventType
    {
        [EnumMember(Value = "Rank")]
        Rank,
        [EnumMember(Value = "Progress")]
        Progress,
        [EnumMember(Value = "Reputation")]
        Reputation,
        [EnumMember(Value = "Music")]
        Music,

        //TODO Add more enum values for each "event"
    }

    public abstract class BaseEvent
    {
        public BaseEvent(DateTime timestamp)
        {
            Timestamp = timestamp;
        }
        public DateTime Timestamp { get; set; }
    }

    public class RankEvent : BaseEvent
    {
        public RankEvent(JsonEvent jsonEvent) : base(jsonEvent.Timestamp)
        {
            Rank1 = jsonEvent.Rank1.Value;
            Rank2 = jsonEvent.Rank2.Value;
        }
        public int Rank1 { get; set; }
        public int Rank2 { get; set; }
    }

    public class ProgressEvent : BaseEvent
    {
        public ProgressEvent(JsonEvent jsonEvent) : base(jsonEvent.Timestamp)
        {
            Task1 = jsonEvent.Task1.Value;
            Task2 = jsonEvent.Task2.Value;
        }
        public int Task1 { get; set; }
        public int Task2 { get; set; }
    }

    public class ReputationEvent : BaseEvent
    {
        public ReputationEvent(JsonEvent jsonEvent) : base(jsonEvent.Timestamp)
        {
            Nation = jsonEvent.Nation.Value;
            State = jsonEvent.State.Value;
        }
        public double Nation { get; set; }
        public double State { get; set; }
    }

    public class MusicEvent : BaseEvent
    {
        public MusicEvent(JsonEvent jsonEvent) : base(jsonEvent.Timestamp)
        {
            MusicTrack = jsonEvent.MusicTrack;
        }
        public string MusicTrack { get; set; }
    }

    //TODO Add more derived sub classes of the BaseEvent

    [JsonObject]
    public class JsonEvent
    {
        [JsonProperty("timestamp")]
        public DateTime Timestamp { get; set; }
        [JsonProperty("event")]
        public EventType EventType { get; set; }
        public int? Rank1 { get; set; }
        public int? Rank2 { get; set; }
        public int? Task1 { get; set; }
        public int? Task2 { get; set; }
        public double? Nation { get; set; }
        public double? State { get; set; }
        public string MusicTrack { get; set; }

        //TODO Add more properties
    }
}

eventList クイックウォッチ: ここに画像の説明を入力してください

追加の読み物:

JsonをC#に解析します

JSONをC#で解析するにはどうすればよいですか?

https://www.jerriepelser.com/blog/deserialize-different-json-object-same-class/

VisualStudioでのデバッグ

(常にF9で行にブレークポイントを設定し、次にF5を押して、F10 / F11でコードをステップ実行すると、コードの動作について多くの洞察が得られます)

https://docs.microsoft.com/en-us/visualstudio/debugger/navigating-through-code-with-the-debugger?view=vs-2019

JsonからC#クラスを作成するためのツール:

https://app.quicktype.io/#l=cs&r=json2csharp

https://marketplace.visualstudio.com/items?itemName=DangKhuong.JSONtoC


更新:上記のC#サブクラスを作成する追加のスクリプトを作成しました:

このスクリプトを実行するだけで、すべてのクラス(を含むProgram.cs)が作成されます。

using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;

namespace CreateFiles
{
    public class Program
    {
        static void Main(string[] args)
        {
            var file = @"X:\Log Files\01.log";
            var desktop = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
            //Change outPutPath to your choosing
            var outPutPath = Path.Combine(desktop, "Temp");
            //Change namespaceName to your choosing
            var namespaceName = "StackOverFlow";
            var uniqueList = GetUniqueEventTypeList(file);
            CreateBaseClass(outPutPath, namespaceName);
            CreateEventClasses(uniqueList, outPutPath, namespaceName);
            CreateEnumClass(uniqueList, outPutPath, namespaceName);
            CreateJsonEventClass(uniqueList, outPutPath, namespaceName);
            CreateProgramClass(uniqueList, outPutPath, namespaceName);
            Console.WriteLine($"\nParsing done! Classes parsed to {outPutPath}");
            Console.WriteLine("Press any key to continue.");
            Console.ReadLine();
        }

        private static List<string> GetUniqueEventTypeList(string file)
        {
            var lines = File.ReadAllLines(file).ToList();
            var uniqueEventTypes = new List<string>();
            var uniqueList = new List<string>();

            foreach (var line in lines)
            {
                var json = JObject.Parse(line);
                var eventType = json["event"].Value<string>();
                if (!uniqueEventTypes.Exists(e => e.Equals(eventType)))
                {
                    uniqueEventTypes.Add(eventType);
                    uniqueList.Add(line);
                }
            }
            return uniqueList;
        }

        private static void CreateEventClasses(List<string> lines, string path, string namespaceName)
        {
            foreach (var line in lines)
            {
                var jObj = JObject.Parse(line);
                CreateEventClass(jObj, path, namespaceName);
            }
        }

        public class ParseClass
        {
            public ParseClass(KeyValuePair<string, JToken> obj)
            {
                Name = obj.Key;
                SetType(obj.Value);
            }
            public string Name { get; set; }
            public string Type { get; set; }
            public bool IsPrimitive { get; set; }

            private void SetType(JToken token)
            {
                switch (token.Type)
                {
                    case JTokenType.Integer:
                        Type = "int";
                        IsPrimitive = true;
                        break;
                    case JTokenType.Float:
                        Type = "double";
                        IsPrimitive = true;
                        break;
                    case JTokenType.String:
                        Type = "string";
                        IsPrimitive = false;
                        break;
                    case JTokenType.Boolean:
                        Type = "bool";
                        IsPrimitive = true;
                        break;
                    case JTokenType.Date:
                        Type = "DateTime";
                        IsPrimitive = true;
                        break;
                    case JTokenType.Guid:
                        Type = "Guid";
                        IsPrimitive = true;
                        break;
                    case JTokenType.Uri:
                        Type = "Uri";
                        IsPrimitive = false;
                        break;
                    default:
                        throw new Exception($"Unknown type {token.Type}");
                }
            }
        }

        private static void CreateProgramClass(List<string> lines, string path, string namespaceName)
        {
            Directory.CreateDirectory(path);
            var className = "Program";
            var fileName = $"{className}.cs";
            var file = Path.Combine(path, fileName);

            try
            {
                // Create a new file     
                using (FileStream fsStream = new FileStream(file, FileMode.Create))
                using (StreamWriter sw = new StreamWriter(fsStream, Encoding.UTF8))
                {
                    //The Program class needed these bytes in the beginning to work
                    sw.WriteLine("using Newtonsoft.Json;");
                    sw.WriteLine("using System;");
                    sw.WriteLine("using System.Collections.Generic;");
                    sw.WriteLine("using System.IO;");
                    sw.WriteLine("using System.Linq;");
                    sw.WriteLine("");
                    sw.WriteLine($"namespace {namespaceName}");
                    sw.WriteLine("{");
                    sw.WriteLine($"    public class {className}");
                    sw.WriteLine("    {");
                    sw.WriteLine($"        static void Main(string[] args)");
                    sw.WriteLine("        {");
                    sw.WriteLine("            var file = @\"X:\\Log Files\\01.log\";");
                    sw.WriteLine("            var eventList = ParseEvents(file);");
                    sw.WriteLine("            //TODO Do something");
                    sw.WriteLine("        }");
                    sw.WriteLine("");
                    sw.WriteLine("        private static List<BaseEvent> ParseEvents(string file)");
                    sw.WriteLine("        {");
                    sw.WriteLine("            //TODO Encapsulate in a try & catch and add a logger for error handling");
                    sw.WriteLine("            var eventList = new List<BaseEvent>();");
                    sw.WriteLine("            var lines = File.ReadAllLines(file).ToList();");
                    sw.WriteLine("");
                    sw.WriteLine("            foreach (var line in lines)");
                    sw.WriteLine("            {");
                    sw.WriteLine("                var jsonEvent = JsonConvert.DeserializeObject<JsonEvent>(line);");
                    sw.WriteLine("                BaseEvent newEvent;");
                    sw.WriteLine("                switch (jsonEvent.EventType)");
                    sw.WriteLine("                {");
                    foreach (var line in lines)
                    {
                        var jObj = JObject.Parse(line);
                        var eventType = jObj["event"].Value<string>();
                        sw.WriteLine($"                    case EventType.{eventType}:");
                        sw.WriteLine($"                        newEvent = new {eventType}Event(jsonEvent);");
                        sw.WriteLine($"                        eventList.Add(newEvent);");
                        sw.WriteLine($"                        break;");
                    }
                    sw.WriteLine("                    default:");
                    sw.WriteLine("                        throw new Exception(String.Format(\"Unknown EventType: {0} \", jsonEvent.EventType));");
                    sw.WriteLine("                }");
                    sw.WriteLine("            }");
                    sw.WriteLine("            return eventList;");
                    sw.WriteLine("        }");
                    sw.WriteLine("    }");
                    sw.WriteLine("}");
                }
                Console.WriteLine($"Created {fileName}.");
            }
            catch (Exception Ex)
            {
                Console.WriteLine(Ex.ToString());
            }
        }

        private static void CreateEnumClass(List<string> lines, string path, string namespaceName)
        {
            Directory.CreateDirectory(Path.Combine(path));
            var className = "EventType";
            var fileName = $"{className}.cs";
            var file = Path.Combine(path, fileName);
            FileInfo fi = new FileInfo(file);

            try
            {
                // Check if file already exists. If yes, throw exception.     
                if (fi.Exists)
                {
                    throw new Exception($"{file} already exists!");
                }

                // Create a new file     
                using (FileStream fsStream = new FileStream(file, FileMode.Create))
                using (StreamWriter sw = new StreamWriter(fsStream, Encoding.UTF8))
                {
                    sw.WriteLine("using Newtonsoft.Json;");
                    sw.WriteLine("using Newtonsoft.Json.Converters;");
                    sw.WriteLine("using System.Runtime.Serialization;");
                    sw.WriteLine("");
                    sw.WriteLine($"namespace {namespaceName}");
                    sw.WriteLine("{");
                    sw.WriteLine($"    [JsonConverter(typeof(StringEnumConverter))]");
                    sw.WriteLine($"    public enum {className}");
                    sw.WriteLine("    {");
                    foreach (var line in lines)
                    {
                        var jObj = JObject.Parse(line);
                        var eventType = jObj["event"].Value<string>();
                        sw.WriteLine($"        [EnumMember(Value = \"{eventType}\")]");
                        sw.WriteLine($"        {eventType},");
                    }
                    sw.WriteLine("    }");
                    sw.WriteLine("}");
                }
                Console.WriteLine($"Created {fileName}.");
            }
            catch (Exception Ex)
            {
                Console.WriteLine(Ex.ToString());
            }
        }

        private static void CreateJsonEventClass(List<string> lines, string path, string namespaceName)
        {

            Directory.CreateDirectory(path);
            var className = "JsonEvent";
            var fileName = $"{className}.cs";
            var file = Path.Combine(path, fileName);
            FileInfo fi = new FileInfo(file);

            var propertyList = new List<ParseClass>();
            foreach (var line in lines)
            {
                var jObject = JObject.Parse(line);
                foreach (var obj in jObject)
                {
                    if (!(obj.Key.Equals("event") || obj.Key.Equals("timestamp")))
                    {
                        propertyList.Add(new ParseClass(obj));
                    }
                }
            }

            try
            {
                // Check if file already exists. If yes, throw exception.     
                if (fi.Exists)
                {
                    throw new Exception($"{file} already exists!");
                }
                // Create a new file     
                using (FileStream fsStream = new FileStream(file, FileMode.Create))
                using (StreamWriter sw = new StreamWriter(fsStream, Encoding.UTF8))
                {
                    sw.WriteLine("using Newtonsoft.Json;");
                    sw.WriteLine("using System;");
                    sw.WriteLine("");
                    sw.WriteLine($"namespace {namespaceName}");
                    sw.WriteLine("{");
                    sw.WriteLine($"    [JsonObject]");
                    sw.WriteLine($"    public class {className}");
                    sw.WriteLine("{");
                    sw.WriteLine("        [JsonProperty(\"timestamp\")]");
                    sw.WriteLine("        public DateTime Timestamp { get; set; }");
                    sw.WriteLine("        [JsonProperty(\"event\")]");
                    sw.WriteLine("        public EventType EventType { get; set; }");
                    foreach (var property in propertyList)
                    {
                        var type = property.IsPrimitive ? property.Type + "?" : property.Type;
                        sw.WriteLine("        public " + type + " " + property.Name + " { get; set; }");
                    }
                    sw.WriteLine("    }");
                    sw.WriteLine("}");
                }
                Console.WriteLine($"Created {fileName}.");
            }
            catch (Exception Ex)
            {
                Console.WriteLine(Ex.ToString());
            }
        }

        private static void CreateBaseClass(string path, string namespaceName)
        {
            Directory.CreateDirectory(path);
            var className = $"BaseEvent";
            var fileName = $"{className}.cs";
            var file = Path.Combine(path, fileName);

            FileInfo fi = new FileInfo(file);

            try
            {
                // Check if file already exists. If yes, throw exception.     
                if (fi.Exists)
                {
                    throw new Exception($"{file} already exists!");
                }

                // Create a new file     
                using (StreamWriter sw = fi.CreateText())
                {
                    sw.WriteLine($"using System;");
                    sw.WriteLine("");
                    sw.WriteLine($"namespace {namespaceName}");
                    sw.WriteLine("{");
                    sw.WriteLine($"    public abstract class BaseEvent");
                    sw.WriteLine("    {");
                    sw.WriteLine($"        public BaseEvent(DateTime timestamp)");
                    sw.WriteLine("        {");
                    sw.WriteLine($"            Timestamp = timestamp;");
                    sw.WriteLine("        }");
                    sw.WriteLine("        public DateTime Timestamp { get; set; }");
                    sw.WriteLine("    }");
                    sw.WriteLine("}");
                }
                Console.WriteLine($"Created {fileName}.");
            }
            catch (Exception Ex)
            {
                Console.WriteLine(Ex.ToString());
            }
        }

        private static void CreateEventClass(JObject jObject, string path, string namespaceName)
        {
            Directory.CreateDirectory(path);
            var eventName = $"{jObject["event"].Value<string>()}";
            var className = $"{eventName}Event";
            var fileName = $"{className}.cs";
            var file = Path.Combine(path, fileName);

            FileInfo fi = new FileInfo(file);

            var propertyList = new List<ParseClass>();
            foreach (var obj in jObject)
            {
                if (!(obj.Key.Equals("event") || obj.Key.Equals("timestamp")))
                {
                    propertyList.Add(new ParseClass(obj));
                }
            }

            try
            {
                // Check if file already exists. If yes, throw exception.     
                if (fi.Exists)
                {
                    throw new Exception($"{file} already exists!");
                }

                // Create a new file     
                using (FileStream fsStream = new FileStream(file, FileMode.Create))
                using (StreamWriter sw = new StreamWriter(fsStream, Encoding.UTF8))
                {
                    sw.WriteLine($"namespace {namespaceName}");
                    sw.WriteLine("{");
                    sw.WriteLine($"    public class {className} : BaseEvent");
                    sw.WriteLine("    {");
                    sw.WriteLine($"        public {className}(JsonEvent jsonEvent) : base(jsonEvent.Timestamp)");
                    sw.WriteLine("        {");
                    foreach (var property in propertyList)
                    {
                        var name = property.IsPrimitive ? $"{property.Name}.Value" : $"{property.Name}";
                        sw.WriteLine($"            {property.Name} = jsonEvent.{name};");
                    }
                    sw.WriteLine("        }");
                    foreach (var property in propertyList)
                    {
                        sw.WriteLine("        public " + property.Type + " " + property.Name + " { get; set; }");
                    }
                    sw.WriteLine("    }");
                    sw.WriteLine("}");
                }
                Console.WriteLine($"Created {fileName}.");
            }
            catch (Exception Ex)
            {
                Console.WriteLine(Ex.ToString());
            }
        }
    }
}

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

XSDファイルからc#クラスを作成できません

分類Dev

C#でクラスを作成します。どのファイルを使用する必要がありますか?

分類Dev

JSON文字列からC#クラスファイルを自動生成する方法

分類Dev

ファイルからクラスを作成する

分類Dev

c#クラスファイルからクラスを呼び出す方法

分類Dev

C#でバイナリデータからファイルを作成する

分類Dev

jsonファイルからAzureCognitive Searchインデックスを作成することは可能ですか?

分類Dev

djangoのjsonファイルからフィクスチャを作成する

分類Dev

C#でPDFファイルページから画像を作成する

分類Dev

C#でDictionary <List、List <string >>から.csvファイルを作成する方法

分類Dev

ObjectiveCでJSONオブジェクトからPDFファイルを作成する

分類Dev

C ++では、ファイルからクラスの複数のオブジェクトを動的に作成するにはどうすればよいですか?

分類Dev

JSONファイルから共起リストを作成する

分類Dev

スクラッチパッドからxpiファイルを作成する方法

分類Dev

XML / JSONファイルをC#クラスに変換する方法は?

分類Dev

空手で外部jsonファイルから動的リクエストボディを作成する際の問題

分類Dev

c#クラスファイルからMVCコントローラーに応答を送信するにはどうすればよいですか?

分類Dev

c# で txt ファイルから 1 文字にアクセスする

分類Dev

MemoryStreamをGoogleドライブのGetリクエストからXMLファイルC#に変換するにはどうすればよいですか?

分類Dev

jsonファイル(またはxmlファイル)からvb.netオブジェクトクラスを作成する方法

分類Dev

C#クラスからXMLファイルにデータを転送する

分類Dev

テキストファイルから配列を作成し、Cで整理する

分類Dev

別のファイルからC#クラスを参照するにはどうすればよいですか?

分類Dev

C# でテキスト ファイルからデータを分割する

分類Dev

C ++で別のソースファイルからクラスを参照することに関する質問

分類Dev

JSONファイルからバックスラッシュを削除する方法

分類Dev

JSONファイルから生成されたJsonPropertyName = nameを使用して、対応するC#クラスの単一の要素にアクセスするにはどうすればよいですか?

分類Dev

C#からプログラムでOnedriveにファイルを作成しますか?

分類Dev

Visual C#他のクラスファイルからアイテムにアクセスする

Related 関連記事

  1. 1

    XSDファイルからc#クラスを作成できません

  2. 2

    C#でクラスを作成します。どのファイルを使用する必要がありますか?

  3. 3

    JSON文字列からC#クラスファイルを自動生成する方法

  4. 4

    ファイルからクラスを作成する

  5. 5

    c#クラスファイルからクラスを呼び出す方法

  6. 6

    C#でバイナリデータからファイルを作成する

  7. 7

    jsonファイルからAzureCognitive Searchインデックスを作成することは可能ですか?

  8. 8

    djangoのjsonファイルからフィクスチャを作成する

  9. 9

    C#でPDFファイルページから画像を作成する

  10. 10

    C#でDictionary <List、List <string >>から.csvファイルを作成する方法

  11. 11

    ObjectiveCでJSONオブジェクトからPDFファイルを作成する

  12. 12

    C ++では、ファイルからクラスの複数のオブジェクトを動的に作成するにはどうすればよいですか?

  13. 13

    JSONファイルから共起リストを作成する

  14. 14

    スクラッチパッドからxpiファイルを作成する方法

  15. 15

    XML / JSONファイルをC#クラスに変換する方法は?

  16. 16

    空手で外部jsonファイルから動的リクエストボディを作成する際の問題

  17. 17

    c#クラスファイルからMVCコントローラーに応答を送信するにはどうすればよいですか?

  18. 18

    c# で txt ファイルから 1 文字にアクセスする

  19. 19

    MemoryStreamをGoogleドライブのGetリクエストからXMLファイルC#に変換するにはどうすればよいですか?

  20. 20

    jsonファイル(またはxmlファイル)からvb.netオブジェクトクラスを作成する方法

  21. 21

    C#クラスからXMLファイルにデータを転送する

  22. 22

    テキストファイルから配列を作成し、Cで整理する

  23. 23

    別のファイルからC#クラスを参照するにはどうすればよいですか?

  24. 24

    C# でテキスト ファイルからデータを分割する

  25. 25

    C ++で別のソースファイルからクラスを参照することに関する質問

  26. 26

    JSONファイルからバックスラッシュを削除する方法

  27. 27

    JSONファイルから生成されたJsonPropertyName = nameを使用して、対応するC#クラスの単一の要素にアクセスするにはどうすればよいですか?

  28. 28

    C#からプログラムでOnedriveにファイルを作成しますか?

  29. 29

    Visual C#他のクラスファイルからアイテムにアクセスする

ホットタグ

アーカイブ