dotnet / dotnet/dotnet-api-docs

Does not "clone" Tag property.

Open
#952 1 comment 0 reactions 0 assignees View on GitHub
area-WinForms dotnet-api/prod Pri2 untriaged
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.