C #: how to use Microsoft.Win32.SafeHandles

Why using Microsoft.Win32.SafeHandles cause C # compiler error:

The type or namespace name 'SafeHandles' does not exist in the namespace 'Microsoft.Win32'

This code is from http://zachsaw.blogspot.com/2010/07/serialport-ioexception-workaround-in-c.html

+3
source share
3 answers

The problem is that you are trying to use sample code written for the normal .Net Framework in a Compact Framework project. This class is not supported by CF.

+3
source

SafeHandle Compact Framework, SDF .

+2

SafeHandles CF. OpenNetCF

0

Source: https://habr.com/ru/post/1781232/


All Articles