One alternative approach is to use a structure with an implicit conversion to a base type.
public struct MyHandle
{
private int _handle;
internal MyHandle(int handle)
{
_handle = handle;
}
public static implicit operator int(MyHandle handle)
{
return handle._handle;
}
}
(int ) , . int, . int Handle, , .