How to convert XML/JSON file to C# class?

前端 未结 4 1023
不知归路
不知归路 2020-12-02 23:59

I have XML file like this:



    

        
4条回答
  •  不思量自难忘°
    2020-12-03 00:32

    Use the super simple way using 'Paste XML As Classes' functionality in Visual studio menu.

    1.copy the xml source in the clipboard, something like CTRL+A and CTRL+C

    2.Go to 'Edit' Menu -> Paste Special -> Paste XML As Classes, to paste the generated classes based on the source xml"

    Ref: More steps in detail at this link

提交回复
热议问题