我正在尝试用 C# 编写一个 .dll 库。这是代码:
namespace StreamManager
{
public class ManageStream
{
public static class ThreadSafe
{
public static readonly object _locker = new object();
public static Bitmap _snapshot;
public static Bitmap Snapshot
{
get
{
lock (_locker)
{
return _snapshot;
}
}
set
{
lock (_locker)
{
_snapshot = value;
}
}
}
}
public class CoupleFrames
{
public CoupleFrames(ColorImageFrame cif, Bitmap df)
{
this.colorFrame = cif;
this.desktopFrame = df;
}
public ColorImageFrame colorFrame;
public Bitmap desktopFrame;
}
public static long Multiply(long x, long y)
{
return (x * y);
}
}
}
但我无法从另一个 C# 应用程序访问这些方法。
我只能浏览这些类:
StreamManager.ManageStream.ThreadSafe
和StreamManager.ManageStream.CoupleFrames
我无法使用该方法Multiply(long x, long y)
或访问该成员Snapshot
。