ExecutionEngineException - >触发EEE的代码示例 [英] ExecutionEngineException -> Code sample that triggers EEE

查看:59
本文介绍了ExecutionEngineException - >触发EEE的代码示例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


后面的代码会抛出ExecutionEngineException。这是使用MSDE 7.1

(7.1.3088)在C#(Microsoft Visual C#.NET 69462-335-0000007-18823)中写的
。该框架是.NET 1.1(1.1.4322)。我在一台带有2Gb RAM的Pentium 4 / 2.6Ghz处理器的Windows XP Professional / SP1上测试了该程序。

代码是运行时的单个表单在
''AddRowsToTable''中抛出一个ExecutionEngineException。


如果对这个问题有更多了解的人可以帮助我,或者指出它

给MS.NET开发者我将不胜感激。如果需要更多信息,我将很高兴提供它。这里是:


使用System;

使用System.Drawing;

使用System.Collections;

使用System.ComponentModel;

使用System.Windows.Forms;

使用System.Data;


命名空间Test_EEE_bug

{

公共类Form1:System.Windows.Forms.Form

{

private DataTable dtSource = new DataTable (" Entries");

private ArrayList logQueue = null;

private System.Timers.Timer logTimer = null;

private readonly object logLock = new object();

private System.Threading.Thread workerThread = null;

private int counter = 0;


private System.Windows.Forms.DataGrid dataGrid1;

private System.Windows.Forms.DataGridTableStyle dataGridTableStyle1;

private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn1;

private System.ComponentModel.Container components = nu ll;


private delegate void SimpleHandler();

private delegate void AddRowsToTableHandler(DataRow [] drs);


public Form1()

{

InitializeComponent();


DataColumn dtColumn = new DataColumn(" Text", typeof(string));

dtColumn.ReadOnly = true;

dtSource.Columns.Add(dtColumn);

dataGrid1.SetDataBinding(dtSource ,null);


logQueue = new ArrayList();


logTimer = new System.Timers.Timer();

logTimer.AutoReset = false;

logTimer.Interval = 250;

logTimer.SynchronizingObject = null;

logTimer.Elapsed + = new

System.Timers.ElapsedEventHandler(logTimer_Elapsed);

logTimer.Enabled = true;

}


private void OnLoad(object sender,System.EventArgs e)

{

SpawnThread();

}


private void SpawnThread()

{

workerThread = new System.Threading.Thread(new

System.Threading.ThreadStart(WorkingThread));

workerThread.Start ();

}


private void WorkingThread()

{

try

{

for(int i = 0;我!= 8; ++ i)

写(日志行+ ++计数器);

}

终于

{

this.BeginInvoke(new SimpleHandler(SpawnThread));

}

}


public void写(字符串文本)

{

lock(logLock)

logQueue.Add(text);

}


private void logTimer_Elapsed(对象发件人,

System.Timers.ElapsedEventArgs e)

{

ArrayList writeOutQueue = null;

lock(logLock)

if(logQueue.Count!= 0)

{

writeOutQueue = logQueue;

logQueue = new ArrayList();

}


if(writeOutQueue = = null)

logTimer.Enabled = true;

else

{

ArrayList dataRows = new ArrayList() ;


for(int i = 0; i!= writeOutQueue.Count; ++ i)

{

DataRow dr1 = dtSource.NewRow();

dr1 [" Text" ] = writeOutQueue [i];

dataRows.Add(dr1);

}


BeginInvoke(新的AddRowsToTableHandler(AddRowsToTable) ,new object [] {

(DataRow [])dataRows.ToArray(typeof(DataRow))});

}

}


private void AddRowsToTable(DataRow [] drs)

{

dataGrid1.SuspendLayout();

dtSource.BeginLoadData();


foreach(drs中的DataRow dr)

dtSource.Rows.Add(dr);

dtSource.EndLoadData();

dataGrid1.ResumeLayout();


logTimer.Enabled = true;

}


protected override void Dispose(bool disposing)

{

if(disposing)

{

if(components!= null)

{

components.Dispose();

} < br $>
}

base.Dispose(disposing);

}


#region Windows窗体设计器生成代码

private void InitializeCo mponent()

{

this.dataGrid1 = new System.Windows.Forms.DataGrid();

this.dataGridTableStyle1 = new System。 Windows.Forms.DataGridTableStyle();

this.dataGridTextBoxColumn1 = new

System.Windows.Forms.DataGridTextBoxColumn();

((系统.ComponentModel.ISupportInitialize)(this.d ataGrid1))。BeginInit();

this.SuspendLayout();

//

/ / dataGrid1

//

this.dataGrid1.DataMember ="" ;;

this.dataGrid1.HeaderForeColor = System.Drawing.SystemColors .ControlText;

this.dataGrid1.Location = new System.Drawing.Point(8,8);

this.dataGrid1.Name =" dataGrid1";

this.dataGrid1.ReadOnly = true;

this.dataGrid1.Size = new System.Drawing.Size(592,440);

this。 dataGrid1.TabIndex = 0;

this.dataGrid1.TableStyles.AddRange(new

System.Windows.Forms.DataGridTableStyle [] {

this .dataGridTableStyl e1});

//

// dataGridTableStyle1

//

this.dataGridTableStyle1.DataGrid = this .dataGrid1;

this.dataGridTableStyle1.GridColumnStyles.AddRange(new

System.Windows.Forms.DataGridColumnStyle [] {


this.dataGridTextBoxColumn1});

this.dataGridTableStyle1.HeaderForeColor =

System.Drawing.SystemColors.ControlText;

this.dataGridTableStyle1.MappingName = " ;;

this.dataGridTableStyle1.ReadOnly = true;

//

// dataGridTextBoxColumn1

//

this.dataGridTextBoxColumn1.Format ="" ;;

this.dataGridTextBoxColumn1.FormatInfo = null;

this.dataGridTextBoxColumn1.HeaderText =" Text";

this.dataGridTextBoxColumn1.MappingName =" Text";

this.dataGridTextBoxColumn1.ReadOnly = true;

this .dataGridTextBoxColumn1.Width = 75;

//

// Form1

//

this.AutoScaleBaseSize = new System.Drawing.Size(5,13);

this.ClientSize = new System.Drawing.Size(608 ,453);

this.Controls.Add(this.dataGrid1);

this.Name =" Form1";

this。 Text =" Form1";

this.Load + = new System.EventHandler(this.OnLoad);

((System.ComponentModel.ISupportInitialize)(this.d ataGrid1))。EndInit();

this.ResumeLayout(false);

}

#endregion


[STAThread]

static void Main()

{

Application.Run(new Form1());

}

}

}


亲切的问候,

-

Tom Tempelaere。

解决方案

我会确保有人看到这个。

谢谢。


-

Bob Powell [MVP]

Visual C#,System.Drawing


Ramuseco Limited .NET咨询
http://www.ramuseco.com

在Windows窗体提示中查找精彩的Windows窗体文章和技巧
http://www.bobpowell.net/tipstricks.htm


用GDI + FAQ回答那些GDI +问题
http://www.bobpowell.net/faqmain.htm


所有新文章都提供C#和VB.NET中的代码。 />
订阅提供的RSS提要,绝不会错过任何新文章。


" TT(Tom Tempelaere)" < _ | \ | _0

2P @ | / \ |蒂蒂____ AThotmailD.Tcom|/\|@P

0_ | \\ \\ | _>

在留言中写道:81 ******************************** ** @ microsof t.com ...

大家好,

后面的代码会抛出ExecutionEngineException。这是用CDE(Microsoft Visual C#.NET 69462-335-0000007-18823)使用MSDE 7.1
(7.1.3088)编写的。该框架是.NET 1.1(1.1.4322)。我测试了Windows XP Professional / SP1上的程序,配备Pentium 4 / 2.6Ghz处理器,带有2Gb内存。
代码是运行时的单个表单在
''AddRowsToTable''中抛出一个ExecutionEngineException


如果对这个问题有更多了解的人可以帮助我,或者指出

对于MS.NET开发人员,我将不胜感激。如果需要更多信息,我很乐意提供。下面是:

使用System;
使用System.Drawing;
使用System.Collections;
使用System.ComponentModel;
使用System.Windows。表单;
使用System.Data;

命名空间Test_EEE_bug
{
公共类Form1:System.Windows.Forms.Form
{
private DataTable dtSource = new DataTable(" Entries");
private ArrayList logQueue = null;
private System.Timers.Timer logTimer = null;
private readonly object logLock = new object() ;私有System.Threading.Thread workerThread = null;
private int counter = 0;
私有System.Windows.Forms.DataGrid dataGrid1;
私有系统。 Windows.Forms.DataGridTableStyle dataGridTableStyle1;
private System.Windows.Forms.DataGridTextBoxColumn
dataGridTextBoxColumn1;
private System.ComponentModel.Container components = null;

私人代表无效SimpleHandler();
私有委托void AddRowsToTableHandler(DataRow [] drs);

public Form1()
{InitialifyComponent();

DataColumn dtColumn = new DataColumn(" Text" ;,typeof(string));
dtColumn.ReadOnly = true;
dtSource.Columns.Add(dtColumn);
dataGrid1.SetDataBinding(dtSource,null);

logQueue = new ArrayList();

logTimer = new System.Timers.Timer();
logTimer.AutoReset = false;
logTimer.Interval = 250;
logTimer.SynchronizingObject = null;
logTimer.Elapsed + = new
System.Timers.ElapsedEventHandler(logTimer_Elapsed);
logTimer.Enabled = true;
}

private void OnLoad(object sender,System.EventArgs e)
{SpawnThread();
}
私有void SpawnThread()
{
workerThread = new System.Threading.Thread(new
System.Threading.ThreadStart(WorkingThread));
workerThread.Start();
}
<私人void WorkingThread()
{
尝试
{
for(int i = 0;我!= 8; ++ i)
写(日志行+ ++计数器);
}
终于
{
这个.BeginInvoke(新的SimpleHandler(SpawnThread)) );
}


public void Write(string text)
{
lock(logLock)
logQueue.Add(text) ;
}
私有void logTimer_Elapsed(对象发送者,
System.Timers.ElapsedEventArgs e)
{Array> writeOutQueue = null;
lock(logLock)
if(logQueue.Count!= 0)
{/> writeOutQueue = logQueue;
logQueue = new ArrayList();
}

if(writeOutQueue == null)
logTimer.Enabled = true;
其他
{ArrayList dataRows = new ArrayList();
for(int i = 0; i!= writeOutQueue.Count; ++ i)
{DataRow dr1 = dtSource.NewRow();
dr1 [" Text" ] = writeOutQueue [i];
dataRows.Add(dr1);
}

BeginInvoke(新的AddRowsToTableHandler(AddRowsToTable),新对象[] {
(DataRow [])dataRows.ToArray(typeof(DataRow))});
}
}
private void AddRowsToTable(DataRow [] drs)
{
dataGrid1.SuspendLayout();
dtSource.BeginLoadData();

foreach(drs中的DataRow dr)
dtSource.Rows.Add(dr);

dtSource.EndLoadData();
dataGrid1.ResumeLayout();

logTimer.Enabled = true;
}

受保护的覆盖void Dispose (bool处理)
{
if(disposing)
{
if(components!= null)
{
components.Dispose();
}
}
base.Dispose(disposing);
}
#region Windows窗体设计器生成的代码
private void InitializeComponent()
{
this.dataGrid1 = new System.Windows.Forms.DataGrid();
this.d ataGridTableStyle1 = new
System.Windows.Forms.DataGridTableStyle();
this.dataGridTextBoxColumn1 = new
System.Windows.Forms.DataGridTextBoxColumn();

(( System.ComponentModel.ISupportInitialize)(this.d ataGrid1))。BeginInit();
this.SuspendLayout();
//
// dataGrid1
//
this.dataGrid1.DataMember ="" ;;
this.dataGrid1.HeaderForeColor =
System.Drawing.SystemColors.ControlText;
this.dataGrid1.Location = new System.Drawing.Point (8,8);
this.dataGrid1.Name =" dataGrid1";
this.dataGrid1.ReadOnly = true;
this.dataGrid1.Size = new System.Drawing.Size( 592,440);
this.dataGrid1.TabIndex = 0;
this.dataGrid1.TableStyles.AddRange(new
System.Windows.Forms.DataGridTableStyle [] {
这个。 dataGridTableStyle1});
//
// dataGridTableStyle1
//
this.dataGridTableStyle1.DataGrid = this.dataGrid1;
this.dataGridTableStyle1.GridColumnStyles.AddRange(new
System.Windows.Forms.DataGridColumnStyle []
this.dataGridTextBoxColumn1});
这个.dataGridTableStyle1.HeaderForeColor =
System.Drawing.SystemColors.ControlText;
this.dataGridTableStyle1.MappingName ="" ;;
this.dataGridTableStyle1.ReadOnly = true;
//
// dataGridTextBoxColumn1
// this.dataGridTextBoxColumn1.Format ="" ;;
this.dataGridTextBoxColumn1.FormatInfo = null;
this.dataGridTextBoxColumn1.HeaderText = " Text";
this.dataGridTextBoxColumn1.MappingName =" Text";
this.dataGridTextBoxColumn1.ReadOnly = true;
this.dataGridTextBoxColumn1.Width = 75;
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5,13);
this.ClientSize = new System.Drawing.Size(608, 453);
this.Controls.Add(this.dataGrid1); this.Name =" Form1"
this.Text =" Form1";
this.Load + = new System.EventHandler(this.OnLoad);
(( System.ComponentModel.ISupportInitialize)(this.d ataGrid1))。EndInit();
this.ResumeLayout(false);
}
#endregion

[STAThread ]
static void Main()
{Application / Run(new Form1());
}
}
}
- Tom Tempelaere。



Hi people,

The code that follows throws an ExecutionEngineException. This was written
in C# (Microsoft Visual C# .NET 69462-335-0000007-18823) using MSDE 7.1
(7.1.3088). The framework is .NET 1.1 (1.1.4322). I tested the program on a
Windows XP Professional/SP1, with a Pentium 4/2.6Ghz processor, with 2Gb RAM.
The code is a single form that when run throws an ExecutionEngineException in
''AddRowsToTable''.

If someone with more knowledge on this matter could help me out, or point it
out to MS.NET developers I''d be grateful. If more information is needed I
will be glad to supply it. Here goes:

using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;

namespace Test_EEE_bug
{
public class Form1 : System.Windows.Forms.Form
{
private DataTable dtSource = new DataTable( "Entries" );
private ArrayList logQueue = null;
private System.Timers.Timer logTimer = null;
private readonly object logLock = new object( );
private System.Threading.Thread workerThread = null;
private int counter = 0;

private System.Windows.Forms.DataGrid dataGrid1;
private System.Windows.Forms.DataGridTableStyle dataGridTableStyle1;
private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn1;
private System.ComponentModel.Container components = null;

private delegate void SimpleHandler( );
private delegate void AddRowsToTableHandler( DataRow[] drs );

public Form1()
{
InitializeComponent();

DataColumn dtColumn = new DataColumn( "Text", typeof(string) );
dtColumn.ReadOnly = true;
dtSource.Columns.Add( dtColumn );
dataGrid1.SetDataBinding( dtSource, null );

logQueue = new ArrayList( );

logTimer = new System.Timers.Timer( );
logTimer.AutoReset = false;
logTimer.Interval = 250;
logTimer.SynchronizingObject = null;
logTimer.Elapsed += new
System.Timers.ElapsedEventHandler(logTimer_Elapsed );
logTimer.Enabled = true;
}

private void OnLoad(object sender, System.EventArgs e)
{
SpawnThread( );
}

private void SpawnThread()
{
workerThread = new System.Threading.Thread( new
System.Threading.ThreadStart( WorkingThread ) );
workerThread.Start( );
}

private void WorkingThread( )
{
try
{
for( int i = 0; i != 8; ++i )
Write( "Log line " + ++counter );
}
finally
{
this.BeginInvoke( new SimpleHandler( SpawnThread ) );
}
}

public void Write( string text )
{
lock( logLock )
logQueue.Add( text );
}

private void logTimer_Elapsed(object sender,
System.Timers.ElapsedEventArgs e)
{
ArrayList writeOutQueue = null;
lock( logLock )
if( logQueue.Count != 0 )
{
writeOutQueue = logQueue;
logQueue = new ArrayList( );
}

if( writeOutQueue == null )
logTimer.Enabled = true;
else
{
ArrayList dataRows = new ArrayList( );

for( int i = 0; i != writeOutQueue.Count; ++i )
{
DataRow dr1 = dtSource.NewRow( );
dr1[ "Text" ] = writeOutQueue[ i ];
dataRows.Add( dr1 );
}

BeginInvoke( new AddRowsToTableHandler( AddRowsToTable ), new object[]{
(DataRow[]) dataRows.ToArray( typeof(DataRow) ) } );
}
}

private void AddRowsToTable( DataRow[] drs )
{
dataGrid1.SuspendLayout( );
dtSource.BeginLoadData( );

foreach( DataRow dr in drs )
dtSource.Rows.Add( dr );

dtSource.EndLoadData( );
dataGrid1.ResumeLayout( );

logTimer.Enabled = true;
}

protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}

#region Windows Form Designer generated code
private void InitializeComponent()
{
this.dataGrid1 = new System.Windows.Forms.DataGrid();
this.dataGridTableStyle1 = new System.Windows.Forms.DataGridTableStyle();
this.dataGridTextBoxColumn1 = new
System.Windows.Forms.DataGridTextBoxColumn();
((System.ComponentModel.ISupportInitialize)(this.d ataGrid1)).BeginInit();
this.SuspendLayout();
//
// dataGrid1
//
this.dataGrid1.DataMember = "";
this.dataGrid1.HeaderForeColor = System.Drawing.SystemColors.ControlText;
this.dataGrid1.Location = new System.Drawing.Point(8, 8);
this.dataGrid1.Name = "dataGrid1";
this.dataGrid1.ReadOnly = true;
this.dataGrid1.Size = new System.Drawing.Size(592, 440);
this.dataGrid1.TabIndex = 0;
this.dataGrid1.TableStyles.AddRange(new
System.Windows.Forms.DataGridTableStyle[] {
this.dataGridTableStyle1});
//
// dataGridTableStyle1
//
this.dataGridTableStyle1.DataGrid = this.dataGrid1;
this.dataGridTableStyle1.GridColumnStyles.AddRange (new
System.Windows.Forms.DataGridColumnStyle[] {

this.dataGridTextBoxColumn1});
this.dataGridTableStyle1.HeaderForeColor =
System.Drawing.SystemColors.ControlText;
this.dataGridTableStyle1.MappingName = "";
this.dataGridTableStyle1.ReadOnly = true;
//
// dataGridTextBoxColumn1
//
this.dataGridTextBoxColumn1.Format = "";
this.dataGridTextBoxColumn1.FormatInfo = null;
this.dataGridTextBoxColumn1.HeaderText = "Text";
this.dataGridTextBoxColumn1.MappingName = "Text";
this.dataGridTextBoxColumn1.ReadOnly = true;
this.dataGridTextBoxColumn1.Width = 75;
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(608, 453);
this.Controls.Add(this.dataGrid1);
this.Name = "Form1";
this.Text = "Form1";
this.Load += new System.EventHandler(this.OnLoad);
((System.ComponentModel.ISupportInitialize)(this.d ataGrid1)).EndInit();
this.ResumeLayout(false);
}
#endregion

[STAThread]
static void Main()
{
Application.Run(new Form1());
}
}
}

Kind regards,
--
Tom Tempelaere.

解决方案

I''ll make sure someone sees this.
Thanks.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"TT (Tom Tempelaere)" <_|\|_0


P@|/\|titi____AThotmailD.Tcom|/\|@P


0_|\|_>
wrote in message news:81**********************************@microsof t.com...

Hi people,

The code that follows throws an ExecutionEngineException. This was written
in C# (Microsoft Visual C# .NET 69462-335-0000007-18823) using MSDE 7.1
(7.1.3088). The framework is .NET 1.1 (1.1.4322). I tested the program on
a
Windows XP Professional/SP1, with a Pentium 4/2.6Ghz processor, with 2Gb
RAM.
The code is a single form that when run throws an ExecutionEngineException
in
''AddRowsToTable''.

If someone with more knowledge on this matter could help me out, or point
it
out to MS.NET developers I''d be grateful. If more information is needed I
will be glad to supply it. Here goes:

using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;

namespace Test_EEE_bug
{
public class Form1 : System.Windows.Forms.Form
{
private DataTable dtSource = new DataTable( "Entries" );
private ArrayList logQueue = null;
private System.Timers.Timer logTimer = null;
private readonly object logLock = new object( );
private System.Threading.Thread workerThread = null;
private int counter = 0;

private System.Windows.Forms.DataGrid dataGrid1;
private System.Windows.Forms.DataGridTableStyle dataGridTableStyle1;
private System.Windows.Forms.DataGridTextBoxColumn
dataGridTextBoxColumn1;
private System.ComponentModel.Container components = null;

private delegate void SimpleHandler( );
private delegate void AddRowsToTableHandler( DataRow[] drs );

public Form1()
{
InitializeComponent();

DataColumn dtColumn = new DataColumn( "Text", typeof(string) );
dtColumn.ReadOnly = true;
dtSource.Columns.Add( dtColumn );
dataGrid1.SetDataBinding( dtSource, null );

logQueue = new ArrayList( );

logTimer = new System.Timers.Timer( );
logTimer.AutoReset = false;
logTimer.Interval = 250;
logTimer.SynchronizingObject = null;
logTimer.Elapsed += new
System.Timers.ElapsedEventHandler(logTimer_Elapsed );
logTimer.Enabled = true;
}

private void OnLoad(object sender, System.EventArgs e)
{
SpawnThread( );
}

private void SpawnThread()
{
workerThread = new System.Threading.Thread( new
System.Threading.ThreadStart( WorkingThread ) );
workerThread.Start( );
}

private void WorkingThread( )
{
try
{
for( int i = 0; i != 8; ++i )
Write( "Log line " + ++counter );
}
finally
{
this.BeginInvoke( new SimpleHandler( SpawnThread ) );
}
}

public void Write( string text )
{
lock( logLock )
logQueue.Add( text );
}

private void logTimer_Elapsed(object sender,
System.Timers.ElapsedEventArgs e)
{
ArrayList writeOutQueue = null;
lock( logLock )
if( logQueue.Count != 0 )
{
writeOutQueue = logQueue;
logQueue = new ArrayList( );
}

if( writeOutQueue == null )
logTimer.Enabled = true;
else
{
ArrayList dataRows = new ArrayList( );

for( int i = 0; i != writeOutQueue.Count; ++i )
{
DataRow dr1 = dtSource.NewRow( );
dr1[ "Text" ] = writeOutQueue[ i ];
dataRows.Add( dr1 );
}

BeginInvoke( new AddRowsToTableHandler( AddRowsToTable ), new object[]{
(DataRow[]) dataRows.ToArray( typeof(DataRow) ) } );
}
}

private void AddRowsToTable( DataRow[] drs )
{
dataGrid1.SuspendLayout( );
dtSource.BeginLoadData( );

foreach( DataRow dr in drs )
dtSource.Rows.Add( dr );

dtSource.EndLoadData( );
dataGrid1.ResumeLayout( );

logTimer.Enabled = true;
}

protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}

#region Windows Form Designer generated code
private void InitializeComponent()
{
this.dataGrid1 = new System.Windows.Forms.DataGrid();
this.dataGridTableStyle1 = new
System.Windows.Forms.DataGridTableStyle();
this.dataGridTextBoxColumn1 = new
System.Windows.Forms.DataGridTextBoxColumn();

((System.ComponentModel.ISupportInitialize)(this.d ataGrid1)).BeginInit();
this.SuspendLayout();
//
// dataGrid1
//
this.dataGrid1.DataMember = "";
this.dataGrid1.HeaderForeColor =
System.Drawing.SystemColors.ControlText;
this.dataGrid1.Location = new System.Drawing.Point(8, 8);
this.dataGrid1.Name = "dataGrid1";
this.dataGrid1.ReadOnly = true;
this.dataGrid1.Size = new System.Drawing.Size(592, 440);
this.dataGrid1.TabIndex = 0;
this.dataGrid1.TableStyles.AddRange(new
System.Windows.Forms.DataGridTableStyle[] {
this.dataGridTableStyle1});
//
// dataGridTableStyle1
//
this.dataGridTableStyle1.DataGrid = this.dataGrid1;
this.dataGridTableStyle1.GridColumnStyles.AddRange (new
System.Windows.Forms.DataGridColumnStyle[] {

this.dataGridTextBoxColumn1});
this.dataGridTableStyle1.HeaderForeColor =
System.Drawing.SystemColors.ControlText;
this.dataGridTableStyle1.MappingName = "";
this.dataGridTableStyle1.ReadOnly = true;
//
// dataGridTextBoxColumn1
//
this.dataGridTextBoxColumn1.Format = "";
this.dataGridTextBoxColumn1.FormatInfo = null;
this.dataGridTextBoxColumn1.HeaderText = "Text";
this.dataGridTextBoxColumn1.MappingName = "Text";
this.dataGridTextBoxColumn1.ReadOnly = true;
this.dataGridTextBoxColumn1.Width = 75;
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(608, 453);
this.Controls.Add(this.dataGrid1);
this.Name = "Form1";
this.Text = "Form1";
this.Load += new System.EventHandler(this.OnLoad);
((System.ComponentModel.ISupportInitialize)(this.d ataGrid1)).EndInit();
this.ResumeLayout(false);
}
#endregion

[STAThread]
static void Main()
{
Application.Run(new Form1());
}
}
}

Kind regards,
--
Tom Tempelaere.



这篇关于ExecutionEngineException - &gt;触发EEE的代码示例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆