-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Closed
Labels
api-approvedAPI was approved in API review, it can be implementedAPI was approved in API review, it can be implementedarea-System.Text.Json
Milestone
Description
EDIT see #63898 (comment) for an API proposal
Original Proposal
Description
internal sealed override Type TypeToConvert => typeof(T);
Error CS0122 'JsonConverter.TypeToConvert' is inaccessible due to its protection level CustomJsonStringEnumConverter.cs
Reproduction Steps
public class MyConverter : JsonConverter<T>
private void SomeLogic()
{
this.TypeToCovert ///Do Something
}
Expected behavior
This property should be accessible to derived classes
protected internal sealed override Type TypeToConvert => typeof(T);
Actual behavior
Error CS0122 'JsonConverter.TypeToConvert' is inaccessible due to its protection level CustomJsonStringEnumConverter.cs
Regression?
No response
Known Workarounds
Define my own copy of the method in the derived class.
Configuration
No response
Other information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
api-approvedAPI was approved in API review, it can be implementedAPI was approved in API review, it can be implementedarea-System.Text.Json