dotnet / dotnet/winforms

Does it make sense for System.Drawing.Imaging.EncoderParameter to have twice the value type but no value property?

Open
#9,216 3 comments 1 reaction 1 assignee Claimed by @JeremyKuhne View on GitHub
api-suggestion area-System.Drawing
Dominant language
C#
Stars
4.9k
Forks
1.1k
Avg merge
20h 23m
Merged PRs (30d)
103

Description

_This issue has been moved from [a ticket on Developer Community](https://developercommunity.visualstudio.com/t/Does-it-make-sense-for-SystemDrawingIm/10319776)._

---
[severity:It's more difficult to complete my work]
The definition of the [`EncoderParameter`](https://learn.microsoft.com/dotnet/api/system.drawing.imaging.encoderparameter) class seems quite odd:

This class provides two properties for retrieving the same information (`Type` and `ValueType`) but no property to retrieve the actual _value_.

What is the reasoning behind this? Is this a bug perhaps?

What sense does it make to retrieve the type of a value twice but not being able to retrieve the actual value?

---
### Original Comments

#### Tracy Wang [MSFT] on 3/24/2023, 09:46 AM:

(private comment, text removed)
#### AxelD on 3/24/2023, 07:16 PM:

(private comment, text removed)
#### Feedback Bot on 3/27/2023, 08:36 AM:

(private comment, text removed)
#### Feedback Bot on 5/2/2023, 08:23 PM:

(private comment, text removed)

---
### Original Solutions
(no solutions)

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.