방금 방금 VS2017로 업그레이드했지만 내 프로젝트를 더 이상 빌드 할 수 없습니다. VS15를 사용할 때 존재하지 않는 이상한 컴파일러 오류가 발생했습니다.Visual Studio 2017 컴파일러 오류
오류 등 :
Syntax Error; value expected
Invalid Expression Term '['
Invalid Expression Term 'byte'
Using the generic type requires 1 type arguments
편집 1
012,351-
6,
- 는 그냥 작은 콘솔 응용 프로그램을 만들고 그것에 코드와 같은 컴파일러 오류 (들)의 일부를 복사
using System;
using System.Runtime.InteropServices;
namespace Error
{
class Program
{
static void Main()
{
Array array2D = null;
if (array2D is Bgra <byte>[,])
{
}
}
}
public interface IColor { }
public interface IColor<T> : IColor
where T : struct
{ }
public interface IColor2 : IColor { }
public interface IColor2<T> : IColor2, IColor<T>
where T : struct
{ }
public interface IColor3 : IColor { }
public interface IColor3<T> : IColor3, IColor<T>
where T : struct
{ }
public interface IColor4 : IColor { }
public interface IColor4<T> : IColor4, IColor<T>
where T : struct
{ }
[StructLayout(LayoutKind.Sequential)]
public struct Bgra<T> : IColor4<T>
where T : struct
{
public Bgra(T b, T g, T r, T a)
{
B = b;
G = g;
R = r;
A = a;
}
public T B;
public T G;
public T R;
public T A;
public override string ToString()
{
return $"B: {B}, G: {G}, R: {R}, A: {A}";
}
public const int IDX_B = 0;
public const int IDX_G = 1;
public const int IDX_R = 2;
public const int IDX_A = 3;
}
}
주 등장.
작은 프로그램에서 오류를 재현 할 수 있습니까? –
"구문 오류"가 있어야하는 코드 줄을 지정하지 않았습니까? 그렇다면 줄은 무엇입니까? –
@MatthewWatson #Edited –