0

I'm very new to coding and currently trying to call a published image classification model to my C# window form.NET and using this code

https://github.com/alanazure/CustomVisionApiClassification/blob/master/CustomVisionApiClassification.Complete/PredictionConsole.cs

but got an error CS0122 'CustomVisionPredictionClient.CustomVisionPredictionClient(params DelegatingHandler[])' is inaccessible due to its protection level' error...

which I think occurred because there is an update from azure custom vision any way to fix this?

  • 1
    This [particular constructor](https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cognitiveservices.vision.customvision.prediction.customvisionpredictionclient.-ctor?view=azure-dotnet#microsoft-azure-cognitiveservices-vision-customvision-prediction-customvisionpredictionclient-ctor(system-net-http-delegatinghandler())) of `CustomVisionPredictionClient` is protected. that's why you are getting this error. [Check here](https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cognitiveservices.vision.customvision.prediction.customvisionpredictionclient.-ctor) – Chetan Jul 12 '22 at 03:59

1 Answers1

0

As because custom vision prediction class library is protected is the reason for receiving error

protected CustomVisionPredictionClient (params System.Net.Http.DelegatingHandler[] handlers);

Refer this Microsoft Document for complete information.

SaiSakethGuduru
  • 2,218
  • 1
  • 5
  • 15