在法最大变量数 [英] Maximum number of variables in method

查看:88
本文介绍了在法最大变量数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在这儿闲着,所以我有这个好奇心,
有人能告诉我什么是C#中的每个方法变量的最大值是多少?

I was here idle, so I had this curiosity, Someone can tell me what's the maximum number of variables per method in C#?

推荐答案

有是没有已知的限制的变量的,也正因为任何变量可以有不同的大小,但数量有一个的内存限制在执行堆栈大小的。

There is no known limit on count of variables, also because any variable can have different size, but there is a memory limit on execution stack size.

引述布赖恩:

对于.NET应用程序的缺省堆栈大小1 MB(默认为32位应用ASP.NET 256
KB和512 KB的64位应用程序ASP.NET),但
你可以改变这种状况。对于应用程序,你可以通过修改可执行文件的PE头更改默认的
的大小。对于你
创建线程,可以使用构造函数重载接受一个堆栈大小。

The default stack size for a .NET application is 1 MB (default is 256 KB for 32-bit ASP.NET apps and 512 KB for 64-bit ASP.NET apps), but you can change that. For the application you can change the default size by modifying the PE header of the executable. For threads you create, you can use the constructor overload that takes a stack size.

在C#中堆叠容量

这篇关于在法最大变量数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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