Click here to Skip to main content
15,887,988 members
Home / Discussions / C#
   

C#

 
AnswerRe: Anyone interested in high quality gif article? Pin
Uwe Keim30-Apr-03 3:17
sitebuilderUwe Keim30-Apr-03 3:17 
AnswerRe: Anyone interested in high quality gif article? Pin
J. Dunlap30-Apr-03 8:20
J. Dunlap30-Apr-03 8:20 
AnswerRe: Anyone interested in high quality gif article? Pin
Jesse Squire7-May-03 11:54
Jesse Squire7-May-03 11:54 
GeneralTo access methods on a different form Pin
ajkumar29-Apr-03 16:55
ajkumar29-Apr-03 16:55 
GeneralRe: To access methods on a different form Pin
Stephane Rodriguez.29-Apr-03 23:18
Stephane Rodriguez.29-Apr-03 23:18 
GeneralSerializing and Deserializing objects through to a web service. Pin
Andy Davey29-Apr-03 14:46
Andy Davey29-Apr-03 14:46 
GeneralBufferedStream & StreamReader Pin
Katalyst29-Apr-03 14:10
Katalyst29-Apr-03 14:10 
GeneralRe: BufferedStream & StreamReader Pin
Katalyst29-Apr-03 15:59
Katalyst29-Apr-03 15:59 
I got around this problem by writing my own "ReadLine" for the buffered stream, eliminating the need for the StreamReader. Here it is, if you are interested. Please excuse the use of "goto", but it was the most natural (and efficient) way to write the code:

/// Gets the next line of text from the NTTP server.  Reads from the
/// buffered stream one byte at a time, until the characters \r \n
/// have been encountered.  Returns the text string, without the
/// line terminators.
private string ReadLine()
{
  StringBuilder sb = new StringBuilder();
  byte b;
  <BR>

  // Read bytes until the \r is encountered, adding it to the string.
  p0:
    b = (byte)bufStream_.ReadByte();
    if (b != '\r')
    {
      sb.Append((char)b);
      goto p0;
    }
  <BR>

  // At this point, the \r has been seen, so we're looking for the
  // \n.  If a second \r is encountered, loop back and look for \n
  // again.  If any other character is found, add it to the string
  // and start over.
  p1:
    b = (byte)bufStream_.ReadByte();
    if (b != '\n')
    {
      sb.Append((char)'\r');
      if (b == '\r')
      {
        goto p1;
      }
      else
      {
        sb.Append((char)b);
        goto p0;
      }
    }
  <BR>

  return sb.ToString();
}

GeneralWindows Forms events Pin
Arun Bhalla29-Apr-03 13:57
Arun Bhalla29-Apr-03 13:57 
GeneralRe: Windows Forms events Pin
Martin Cook29-Apr-03 16:53
professionalMartin Cook29-Apr-03 16:53 
GeneralGet strings from IntPtr Pin
Anonymous29-Apr-03 10:40
Anonymous29-Apr-03 10:40 
GeneralRe: Get strings from IntPtr Pin
Stephane Rodriguez.29-Apr-03 10:58
Stephane Rodriguez.29-Apr-03 10:58 
GeneralResourceManager.GetObject Pin
J. Dunlap29-Apr-03 10:28
J. Dunlap29-Apr-03 10:28 
GeneralExecuting an .exe file on server trough ASP.NET as Administrator Pin
Jonas Follesø29-Apr-03 10:06
Jonas Follesø29-Apr-03 10:06 
GeneralRe: Executing an .exe file on server trough ASP.NET as Administrator Pin
Stephane Rodriguez.29-Apr-03 11:08
Stephane Rodriguez.29-Apr-03 11:08 
GeneralRe: Executing an .exe file on server trough ASP.NET as Administrator Pin
Jonas Follesø29-Apr-03 12:04
Jonas Follesø29-Apr-03 12:04 
GeneralRe: Executing an .exe file on server trough ASP.NET as Administrator Pin
Ray Cassick29-Apr-03 11:17
Ray Cassick29-Apr-03 11:17 
GeneralRe: Executing an .exe file on server trough ASP.NET as Administrator Pin
Jonas Follesø29-Apr-03 12:06
Jonas Follesø29-Apr-03 12:06 
GeneralRe: Dirty solution... Pin
Jonas Follesø29-Apr-03 23:14
Jonas Follesø29-Apr-03 23:14 
Generalsaving to an evironment var Pin
monrobot1329-Apr-03 8:27
monrobot1329-Apr-03 8:27 
GeneralRe: saving to an evironment var Pin
Stephane Rodriguez.29-Apr-03 11:06
Stephane Rodriguez.29-Apr-03 11:06 
GeneralRe: saving to an evironment var Pin
monrobot1330-Apr-03 2:54
monrobot1330-Apr-03 2:54 
Generalsource draw Pin
tuan_tomy29-Apr-03 7:08
tuan_tomy29-Apr-03 7:08 
GeneralRe: source draw Pin
Stephane Rodriguez.29-Apr-03 11:11
Stephane Rodriguez.29-Apr-03 11:11 
QuestionChange local hostname using WMI? Pin
KevinS7529-Apr-03 6:24
KevinS7529-Apr-03 6:24 

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.