Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Messagebox object support #10213

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Messagebox object support #10213

wants to merge 1 commit into from

Conversation

BartaBlzs
Copy link

@BartaBlzs BartaBlzs commented Dec 30, 2024

Fixes #10212

Description

Adding a method to the MessageBox class, that enables the developer to show not just strings, but any object.

Customer Impact

Very little impact, it saves ".ToString()" if you want to show an object in a MessageBox.

Testing

None 💀

Risk

Don't think there's any risk.

Microsoft Reviewers: Open in CodeFlow

Adding a method to the MessageBox class, that enables the developer to show not just strings, but any object.
@BartaBlzs BartaBlzs requested review from a team as code owners December 30, 2024 08:07
@dotnet-policy-service dotnet-policy-service bot added PR metadata: Label to tag PRs, to facilitate with triage Community Contribution A label for all community Contributions labels Dec 30, 2024
@BartaBlzs
Copy link
Author

@dotnet-policy-service agree

@miloush
Copy link
Contributor

miloush commented Dec 30, 2024

This requires API review. Make a commit that contains only the suggested change, do some testing. It crashes when the object is null. Why only this override?

/// Displays a message box with the string representation of the specified object.
/// </para>
/// </devdoc>
public static MessageBoxResult Show(object messageBoxObject)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I do not think it is the good design. Because this override do as public static MessageBoxResult Show(string messageBoxText) can do, and this override hide the implementation details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Community Contribution A label for all community Contributions PR metadata: Label to tag PRs, to facilitate with triage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Messagebox object support
3 participants