Click here to Skip to main content
15,904,416 members
Home / Discussions / C#
   

C#

 
GeneralRe: trapping keystrokes Pin
Kir Birger6-Dec-04 7:01
Kir Birger6-Dec-04 7:01 
Questionhow can scan port in c# Pin
mehdidj4-Dec-04 17:08
mehdidj4-Dec-04 17:08 
AnswerRe: how can scan port in c# Pin
Alex Korchemniy4-Dec-04 18:16
Alex Korchemniy4-Dec-04 18:16 
AnswerRe: how can scan port in c# Pin
leppie5-Dec-04 17:27
leppie5-Dec-04 17:27 
Generalxp look in .net Pin
Anonymous4-Dec-04 17:04
Anonymous4-Dec-04 17:04 
GeneralRe: xp look in .net Pin
Alex Korchemniy4-Dec-04 18:18
Alex Korchemniy4-Dec-04 18:18 
GeneralRe: xp look in .net Pin
Anonymous4-Dec-04 18:53
Anonymous4-Dec-04 18:53 
GeneralRe: xp look in .net Pin
Stefan Troschuetz4-Dec-04 22:13
Stefan Troschuetz4-Dec-04 22:13 
GeneralRe: xp look in .net Pin
Nick Parker5-Dec-04 4:36
protectorNick Parker5-Dec-04 4:36 
GeneralRe: xp look in .net Pin
Stefan Troschuetz5-Dec-04 5:00
Stefan Troschuetz5-Dec-04 5:00 
Generalserialization problems Pin
Kir Birger4-Dec-04 14:21
Kir Birger4-Dec-04 14:21 
Generalneed help with listbox Pin
tom_dx4-Dec-04 13:46
tom_dx4-Dec-04 13:46 
GeneralRe: need help with listbox Pin
tom_dx4-Dec-04 14:03
tom_dx4-Dec-04 14:03 
GeneralShape moving across screen HELP! Pin
...---...4-Dec-04 11:47
...---...4-Dec-04 11:47 
GeneralRe: Shape moving across screen HELP! Pin
tom_dx4-Dec-04 13:05
tom_dx4-Dec-04 13:05 
GeneralRe: Shape moving across screen HELP! Pin
thepersonof5-Dec-04 4:48
thepersonof5-Dec-04 4:48 
GeneralRe: Shape moving across screen HELP! Pin
Anonymous5-Dec-04 11:08
Anonymous5-Dec-04 11:08 
GeneralRe: Shape moving across screen HELP! Pin
Stanciu Vlad5-Dec-04 5:45
Stanciu Vlad5-Dec-04 5:45 
GeneralCatching Stack Unwinding Pin
tbpub4-Dec-04 9:12
tbpub4-Dec-04 9:12 
GeneralLDAP Query Using Directory Services Pin
Member 7756734-Dec-04 6:33
Member 7756734-Dec-04 6:33 
Generalvideo conf. Pin
Sakkijha4-Dec-04 4:28
Sakkijha4-Dec-04 4:28 
GeneralRe: video conf. Pin
tom_dx4-Dec-04 13:07
tom_dx4-Dec-04 13:07 
GeneralFileStream : Problem in Reading File Pin
Zishan Haider4-Dec-04 2:45
Zishan Haider4-Dec-04 2:45 
hello,

I have a FileStream object in an OnChange event. Everytime OnChange is called, the code goes like this :

private void OnChanged(object source, FileSystemEventArgs e)
{

byte [] data = new byte[100];
try
{
fs.Read(data,offSet,fs.Length-offSet);
offSet = fs.Length;
changedText = trim(Encoding.ASCII.GetString(data));
doOperations(changedText);
}
catch(Exception ee)
{}

}

Now suppose on first OnChange call, 50 bytes were read, filling up the byte array (data) from index 0 to 49. The Problem starts on the next OnChange call. It continues to fill my byte array from 50 onwards, which finally results in the System.ArgumentException, when it reaches the array length 100. I need my byte array to be filled from 0 everytime OnChange is called. How can I do it?

regards
Zishan
GeneralRe: FileStream : Problem in Reading File Pin
Stanciu Vlad4-Dec-04 8:24
Stanciu Vlad4-Dec-04 8:24 
GeneralTranslation matrix and roation angle Pin
montu33774-Dec-04 2:10
montu33774-Dec-04 2:10 

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.