Visual Studio 2010, how to quickly capture an object as serialized XML? (when debugging)

I am debugging the code, and I have a strongly typed object that has about 30 properties. Is there a quick way to put an object on the clipboard as serialized XML?

So in other words:

If I had a class definition

 public class myObj
    {
        public int ID
        {
            get;
            set;
        }
    }

and debugged these 2 lines of code:

myObj object = new myObj();
object.ID = 123;

Is there a way to right click and “copy object as serialized xml”.

for creating

<object>
   <ID>123</ID>
</object>
+3
source share
1 answer

If you can make compromises and instead of XML output, you are simply interested in a person who can be read, who can be copied as text. For example, for example:

{ConsoleApp.myObj}
    ID: 5

Immediate , "", .


: , , , .

+4

Source: https://habr.com/ru/post/1784627/


All Articles