注意:该类在我的项目中实现的我的外部DLL中。 在我的班级图书馆里,有这个班Annuncio 里面有一个清单。 该列表必须包含图像,但是我的代码给我一个错误。
using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
namespace BuyNowDLL
{
class Annuncio
{
public List<Image> Images1 = new List<Image>(); //Make me error (Image)
}
}
我该如何解决?
答案 0 :(得分:0)
您的代码没有任何错误,这是因为您没有引用System.Drawing.dll
在解决方案资源管理器中右键单击项目名称,然后单击“添加”>“引用”
然后在程序集列表中选择选中{
"name": "RNNProject",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "16.8.3",
"react-native": "0.59.1",
"react-native-navigation": "^2.15.0"
},
"devDependencies": {
"@babel/core": "7.4.0",
"@babel/runtime": "7.4.2",
"babel-jest": "24.5.0",
"jest": "24.5.0",
"metro-react-native-babel-preset": "0.53.1",
"react-test-renderer": "16.8.3"
},
"jest": {
"preset": "react-native"
}
}
graddle-wrapper.properties
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
Build Graddle
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1' }
。