O
ozbear
Using :
Microsoft Visual Studio 2008
Version 9.0.30729.1 SP
Microsoft .NET Framework
Version 3.5 SP1
Installed Edition: Professional
Microsoft Visual C# 2008
The IDE displays the error Cannot create an array with
a negative size whenever the source is modified but the
project does build and the error goes away, until modified
again:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace ArrayBug
{
public partial class Form1 : Form
{
const int N = 4096; /* buffer size */
const int F = 60; /* lookahead buffer size */
byte[] text_buf = new byte[(N + F) - 1];
public Form1()
{
InitializeComponent();
}
}
}
The error appears in the IDE at the text_buf declaration.
The project does build, however, and the array size at
runtime is correct. I have searched for other reports of
this and have not found anything.
Oz
Microsoft Visual Studio 2008
Version 9.0.30729.1 SP
Microsoft .NET Framework
Version 3.5 SP1
Installed Edition: Professional
Microsoft Visual C# 2008
The IDE displays the error Cannot create an array with
a negative size whenever the source is modified but the
project does build and the error goes away, until modified
again:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace ArrayBug
{
public partial class Form1 : Form
{
const int N = 4096; /* buffer size */
const int F = 60; /* lookahead buffer size */
byte[] text_buf = new byte[(N + F) - 1];
public Form1()
{
InitializeComponent();
}
}
}
The error appears in the IDE at the text_buf declaration.
The project does build, however, and the array size at
runtime is correct. I have searched for other reports of
this and have not found anything.
Oz