Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Maximum String Length

0 views
Skip to first unread message

Jon Skeet [C# MVP]

unread,
Mar 23, 2004, 6:22:39 AM3/23/04
to
Dave <anon...@discussions.microsoft.com> wrote:
> Simple question but i can't find the answer:
> What is the maximum length of the String data type in C#?
> Is it any different when developing in the .net compact framework?

I suspect it's 2^31-1, i.e. int.MaximumValue.

Suffice to say you're likely to run into memory problems long before
you reach it.

--
Jon Skeet - <sk...@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too

Miha Markic [MVP C#]

unread,
Mar 23, 2004, 6:23:46 AM3/23/04
to
Hi Dave,

I don't think that there are any particular restrictions.

--
Miha Markic [MVP C#] - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

"Dave" <anon...@discussions.microsoft.com> wrote in message
news:84CAF757-BD24-4B10...@microsoft.com...
> Hi All,


>
> Simple question but i can't find the answer:
> What is the maximum length of the String data type in C#?
> Is it any different when developing in the .net compact framework?
>

> Thanks,
> Dave.
>


0 new messages