dotnet / dotnet/dotnet-api-docs
Does not "clone" Tag property.
- Dominant language
- C#
- Stars
- 949
- Forks
- 1.7k
- Avg merge
- 3d 27m
- Merged PRs (30d)
- 49
Description
The term "Clone" as it is used everywhere else in the .NET framework implies that at least a shallow copy of all data members is performed. I therefore expected "CloneMenu()" to perform a shallow copy of all members plus whatever internal housekeeping needed to be done specific to a menu item. However, the "Tag" member does NOT get copied and is null in the resulting MenuItem. If a method with "Clone" in the name does not perform a complete shallow copy then the documentation should explicitly state which members will and will not be copied for clarity.
---
#### Document Details
⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*
* ID: 73d94fdf-6c8a-2776-d7e0-9a4c8df93f44
* Version Independent ID: 431ec54c-84de-07bb-0219-611081189303
* Content: [MenuItem.CloneMenu Method (System.Windows.Forms)](https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.menuitem.clonemenu?redirectedfrom=MSDN&view=netframework-4.7.2#System_Windows_Forms_MenuItem_CloneMenu)
* Content Source: [xml/System.Windows.Forms/MenuItem.xml](https://github.com/dotnet/dotnet-api-docs/blob/master/xml/System.Windows.Forms/MenuItem.xml)
* Product: **dotnet-api**
* GitHub Login: @dotnet-bot
* Microsoft Alias: **dotnetcontent**
Contributor guide
Assessment
This issue has not been assessed yet.