Hi John
I just used the "record5.Append(' ',94);" and then Inserted the characters I wanted to.
It worked fine.
Oh, but one thing, "record5.Length('',94); " in the end does not work , however,if I use record5.Length=94; , it works.
Thanks for your help.
Hi John
Thanks a lot for your reply. But if I try to set the length after all Inserts (which I had tried earlier), I am getting the SystemOutOfRange Exception cause by default the capacity is set to 16 characters. To counter this,I had set the Capacity to 94 and also did EnsureCapacity(94) to...
Hello Group
I have the following StringBuilder object code:
//----Begin CODE----------
StringBuilder record5 = new StringBuilder();
record5.Length = 94; //Set length
record5.Insert(0,"0520"); //Insert at position 0
record5.Insert(4,"4CCC");
record5.Insert(20,"20CCCC")...
hi
As Sacheson said C# is case sensitive. To use a MessageBox Class and the Show method, All you need to do is declare your box as:
MessageBox.Show("Hello World");
Hope it works.
- Another C# Newbie :)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.