473,326 Members | 2,192 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

type string

Hi,
I need load in a string about 500 characters.
String type has a capacity of 256.
What type i can use?
Thanks!
Nov 16 '05 #1
5 1565
"Marco Ivaldi" <an*******@discussions.microsoft.com> wrote:
I need load in a string about 500 characters.
String type has a capacity of 256.
What type i can use?


Where did you read 256? A string in C# can hold a lot more than that!

P.
Nov 16 '05 #2
On Wed, 7 Jul 2004 06:49:19 -0700, "Marco Ivaldi"
<an*******@discussions.microsoft.com> wrote:
Hi,
I need load in a string about 500 characters.
String type has a capacity of 256.
What type i can use?
Thanks!


You can use String
it can easily store more than 500 characters
There is no set capacity for it except the memory on your machine

I don't know where you got the 256 limit from but it's not true

Vin
Nov 16 '05 #3
Marco Ivaldi <an*******@discussions.microsoft.com> wrote:
I need load in a string about 500 characters.
String type has a capacity of 256.
What type i can use?


No, the string type most definitely *doesn't* have a capacity of only
256 characters. What makes you think it does?

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #4
Strings can be much bigger. If you cannot load at once, consider chunking it
in. As an example:

StringBuilder sb = new StringBuilder();
sb.Append("12345678901234567890");
sb.Append("12345678901234567890");
sb.Append("12345678901234567890");
sb.Append("12345678901234567890");
sb.Append("12345678901234567890");
sb.Append("12345678901234567890");
sb.Append("12345678901234567890");
sb.Append("12345678901234567890");
sb.Append("12345678901234567890");
sb.Append("12345678901234567890");
sb.Append("12345678901234567890");
sb.Append("12345678901234567890");
sb.Append("12345678901234567890");
sb.Append("12345678901234567890");
sb.Append("12345678901234567890");
sb.Append("12345678901234567890");
sb.Append("12345678901234567890");
sb.Append("12345678901234567890");
sb.Append("12345678901234567890");
sb.Append("12345678901234567890");
sb.Append("12345678901234567890");
sb.Append("12345678901234567890");
sb.Append("12345678901234567890");
sb.Append("12345678901234567890");
sb.Append("12345678901234567890");
sb.Append("12345678901234567890");
sb.Append("12345678901234567890");
....
string newString = sb.ToString();
Response.Write(newString);

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************************************************
Think Outside the Box!
************************************************
"Marco Ivaldi" <an*******@discussions.microsoft.com> wrote in message
news:28*****************************@phx.gbl...
Hi,
I need load in a string about 500 characters.
String type has a capacity of 256.
What type i can use?
Thanks!


Nov 16 '05 #5
a string can hold up to 2^32 (~2billion) characters in it.

--
cody

Freeware Tools, Games and Humour
http://www.deutronium.de.vu || http://www.deutronium.tk
"Marco Ivaldi" <an*******@discussions.microsoft.com> schrieb im Newsbeitrag
news:28*****************************@phx.gbl...
Hi,
I need load in a string about 500 characters.
String type has a capacity of 256.
What type i can use?
Thanks!

Nov 16 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: chobin | last post by:
Hi all. I've a terrible question. I've to build one XML page (based on a xml schema) that implements a dynamic database. In particular, I would declare something like this: <?xml version="1.0"...
3
by: dgaucher | last post by:
Hi, I want to consume a Web Service that returns a choice, but my C++ client always receives the same returned type. On the other hand, when I am using a Java client, it is working fine (of...
2
by: Jason Cartwright | last post by:
I have an abstract base class and two derived classes that I want to serialize and deserialize with schema validation. When I serialize instances of the derived classes the XmlSerializer adds the...
3
by: Mike in Paradise | last post by:
I have an application that is being passed objects which could either be an instance or a Type in the case of a Static Class When you do the GetType on the object that was originally a Static...
3
by: Imran Aziz | last post by:
Hello All, I am getting the following error on our production server, and I dont get the same error on the development box. Unable to cast object of type 'System.Byte' to type 'System.String'. ...
1
by: Marc | last post by:
Hi! I'm working with a C# client that calls a php web service. I've created a wrapper to call the service using .NET wsdl tool (adding a web reference). The call to the server works fine, it...
0
by: Chris Fink | last post by:
When I am consuming a webservice, an object has an undefined value (inq3Type.Call3Data). I do not completely understand why this is happening and apologize for the vague question. My assumption...
7
by: Sky | last post by:
I have been looking for a more powerful version of GetType(string) that will find the Type no matter what, and will work even if only supplied "{TypeName}", not the full "{TypeName},{AssemblyName}"...
42
by: blisspikle | last post by:
I tried closely copying some code that I found on this group for assigning a type at runtime, but I cannot get it to work. Can someone see what is wrong with my logic? Thanks, Private Sub...
5
by: mknoll217 | last post by:
I am a newbie at XML. I have been given an xml document that I need to write the schema for, for a class assignment. The xml given to me is <?xml version="1.0"?> <Vendors> <Vendor> ...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.