Error 1 Inconsistent accessibility: field type 'Youtube_Manager.Ffmpeg' is less accessible than field 'Youtube_Manager.ScreenShot.fmpeg'
在课程顶部,我补充道:
using System;
using System.Drawing;
using System.IO;
using System.Windows.Forms;
using System.ComponentModel;
namespace Youtube_Manager
{
public class ScreenShot
{
#region Global Variables
public static Ffmpeg fmpeg;
然后我打电话给计时器点击事件中的另一个类使用fmpeg:
ScreenShot.fmpeg.Close();
我正在上课的ScreenShot中出现错误:
错误1辅助功能不一致:字段类型“Youtube_Manager.Ffmpeg
”的访问权限低于字段“Youtube_Manager.ScreenShot.fmpeg
”
这是Ffmpeg课程的顶级成员:
using System;
using System.Windows.Forms;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Drawing;
using System.IO.Pipes;
using System.Runtime.InteropServices;
using System.Diagnostics;
using System.IO;
using DannyGeneral;
namespace Youtube_Manager
{
class Ffmpeg
{
NamedPipeServerStream p;
String pipename = "mytestpipe";
System.Diagnostics.Process process;
string ffmpegFileName = "ffmpeg.exe";
string workingDirectory;
public Ffmpeg()
{
即使我将变量fmpeg从static变为public,我也会遇到同样的错误。