Click here to Skip to main content
15,891,951 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
QuestionWhat is the best method of adding controls Pin
Phanindra Kumar1-Apr-06 0:53
Phanindra Kumar1-Apr-06 0:53 
AnswerRe: What is the best method of adding controls Pin
CWIZO3-Apr-06 3:31
CWIZO3-Apr-06 3:31 
QuestionVS.2005 C# app deployment help needed Pin
BambooMoon31-Mar-06 10:44
BambooMoon31-Mar-06 10:44 
AnswerRe: VS.2005 C# app deployment help needed Pin
Dave Kreskowiak31-Mar-06 13:28
mveDave Kreskowiak31-Mar-06 13:28 
GeneralRe: VS.2005 C# app deployment help needed Pin
BambooMoon31-Mar-06 13:36
BambooMoon31-Mar-06 13:36 
QuestionIssue with DatabaseFactory.CreateDatabase Pin
venkaa31-Mar-06 10:25
venkaa31-Mar-06 10:25 
AnswerRe: Issue with DatabaseFactory.CreateDatabase Pin
Mr Brown Shoes31-Mar-06 14:58
Mr Brown Shoes31-Mar-06 14:58 
QuestionStringBuilder.Append(Char(0)) Issues Pin
AhClem31-Mar-06 9:29
AhClem31-Mar-06 9:29 
I've been putting together a simple routine to parse a streamreader, using a StringBuilder object as a buffer.
<br />
  Dim streamBuffer(bufferSize) As Char<br />
  Dim strBldr As New StringBuilder((bufferSize * 2) + 2)<br />
  Dim reader As StreamReader<br />
  <br />
Do<br />
      If strBldr.Length < bufferSize Then      <br />
        Array.Clear(streamBuffer, 0, streamBuffer.Length)<br />
        streamReadLength = reader.Read(streamBuffer, 0, bufferSize)<br />
<br />
        strBldr.Append(streamBuffer)<br />
<br />
      End If <br />
      .<br />
      .<br />
      .<br />

What seems really weird is that only some passes through the loop the StringBuilder object's Length is incremented by the size of the streamBuffer's contents but the contents are not Appended to the StringBuilder.

So, while the strBldr.Length will equal say 4096, the StrBldr.ToString().Length will equal 310 and StrBldr.ToString() will produce a string that is 310 characters in length. Meanwhile, the streamBuffer field will have an array of characters in it.

I've searched unsuccessfully for any reports of bugs. Anyone got any ideas?


Will
QuestionHow to decide in which page is printing? Pin
VBSiv31-Mar-06 2:11
VBSiv31-Mar-06 2:11 
Questionit might be simple but making me puzzled Pin
nauty31-Mar-06 1:17
nauty31-Mar-06 1:17 
AnswerRe: it might be simple but making me puzzled Pin
hbk72331-Mar-06 1:24
hbk72331-Mar-06 1:24 
AnswerRe: it might be simple but making me puzzled Pin
Mr Brown Shoes31-Mar-06 15:19
Mr Brown Shoes31-Mar-06 15:19 
QuestionRe: it might be simple but making me puzzled Pin
nauty2-Apr-06 20:49
nauty2-Apr-06 20:49 
QuestionReverse Name Assignment Pin
Shadow Sprite31-Mar-06 0:30
Shadow Sprite31-Mar-06 0:30 
AnswerRe: Reverse Name Assignment Pin
hbk72331-Mar-06 1:27
hbk72331-Mar-06 1:27 
AnswerRe: Reverse Name Assignment Pin
Dave Kreskowiak31-Mar-06 5:44
mveDave Kreskowiak31-Mar-06 5:44 
GeneralRe: Reverse Name Assignment Pin
Dan Neely31-Mar-06 6:01
Dan Neely31-Mar-06 6:01 
GeneralRe: Reverse Name Assignment Pin
Dave Kreskowiak31-Mar-06 6:59
mveDave Kreskowiak31-Mar-06 6:59 
GeneralRe: Reverse Name Assignment Pin
Shadow Sprite1-Apr-06 13:52
Shadow Sprite1-Apr-06 13:52 
QuestionHow to create a new certificate file using .net? Pin
superSYNC30-Mar-06 17:17
superSYNC30-Mar-06 17:17 
QuestionEnterprise Library, Data Access Application Block (DAAB), Best Practicises Question Pin
Mr Brown Shoes30-Mar-06 14:05
Mr Brown Shoes30-Mar-06 14:05 
AnswerRe: Enterprise Library, Data Access Application Block (DAAB), Best Practicises Question Pin
AhClem31-Mar-06 9:49
AhClem31-Mar-06 9:49 
QuestionRe: Enterprise Library, Data Access Application Block (DAAB), Best Practicises Question Pin
Mr Brown Shoes31-Mar-06 14:52
Mr Brown Shoes31-Mar-06 14:52 
AnswerRe: Enterprise Library, Data Access Application Block (DAAB), Best Practicises Question Pin
AhClem1-Apr-06 5:35
AhClem1-Apr-06 5:35 
QuestionRe: Enterprise Library, Data Access Application Block (DAAB), Best Practicises Question Pin
Mr Brown Shoes2-Apr-06 14:25
Mr Brown Shoes2-Apr-06 14:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.