Several times during our current project, the designer of the visual studio made changes that led to the loss of code. For example, event handler players that were manually configured in the constructor code were lost. Does anyone know why this happened?
Edit: I understand that manually editing these files is not a good idea, but it also happened with other events created through the constructor.
Good for starters, read the XML at the top of your designer.cs file.
/// <summary> /// Required method for Designer support - do not modify /// contents of this method with the code editor. /// </summary> private void InitializeComponent()
, , . , , .
, , . , , , , NullReferenceException.
, , , , InitializeComponent(). - , , , .designer.cs, , .
, , , ? MyForm.Designer.cs? partial.
MyForm.Designer.cs
partial
. - ( , ). , , , .
.cs, , , Load .
, , , . , -, , , ... ?
-, , , Visual Studio , , , , .
, , - Microsoft , , . , Microsoft... , , , , .
Source: https://habr.com/ru/post/1735072/More articles:Заменить идентификатор на строку в представлении SQL - sql64-bit quick comparison - c ++WPF GridView: Newspaper column? - wpfHow to stop renaming Maven installed cans - maven-2rails 404 422 500 completely empty - ruby-on-railsRunning a command from C ++, what is expected in argv [0]? - c ++ASP.NET AXD resources blocked on client side? - asp.netЭффективный способ удалить все записи в словаре ниже указанного значения - dictionaryGoogle App Engine: problem with Datastore Query - pythonAuthentification-None for one folder (page) when the project is in the FormsAuthenification - authenticationAll Articles