I am working to debug some codes and have seen a bunch of auto-built methods and objects.
For these, I get the following comments at the top of the code:
// ----------------- - ------------------------------------------------- - ---------- // & lt; Auto Generated & gt; // This code was generated by a tool // Runtime Version: 2.0.50727.42 // // Changes made in this file may be the cause of wrong behavior and if it is reproduced // it will be lost . // & lt; / Auto-generated & gt; // ------------------------------------------------ ------------------------------
How to Do you know what code generates? My curiosity has made me better on this, so I ask. I have seen some parts of the comment in Google and have not found anything solid
/ / ---------------- --------------------------------- ----------------- ------------ // & lt; Auto Generated & gt; // This code was generated by a tool // Runtime Version: 2.0.50727.42 // // Changes made in this file may be the cause of wrong behavior and if it is reproduced // it will be lost . // & lt; / Auto-generated & gt; // ------------------------------------------------ ------------------------------ Namespot first Web {public partial class _Default {/// & lt; Summary & gt; ///Form1 control/// & lt; / Summary & gt; /// & lt; Comment & gt; /// Auto Generated field /// To modify the transfer field declaration for code-back file from the design file, go to /// & lt; / Comment & gt; Protected Global :: Systems Web. UI. Html control HTML Forms Form 1; }}
You will not change this auto-generated C # file. As you continue to add ASP.NET controls on the page, this file increases with additional announcements in older versions of C # (before version 2.0) and earlier versions of Visual Studio (prior to version 2005), this code is the default default .aspx. The cs file will also be in.
With the introduction of partial classes in C #, code related to the same class can be divided into several files. Here you see "Public Partial Class _Default", which is used to capture the code produced by Visual Studio Designer You will also see the signature of the same category in the Default.aspx.cs file (you Use it to write their own custom code).
Therefore, the developer (you) and the designer (visual studio) can work independently, with no step on each other.
To do this
Comments
Post a Comment