Click here to Skip to main content
15,899,679 members
Home / Discussions / C#
   

C#

 
GeneralRe: How do I read data from an Excel Spreadsheet with C#?? Please Help! Pin
Colin Angus Mackay8-Apr-05 4:10
Colin Angus Mackay8-Apr-05 4:10 
GeneralDesktop Sharing / Application Sharing Pin
Dittto218-Apr-05 1:42
Dittto218-Apr-05 1:42 
GeneralRe: Desktop Sharing / Application Sharing Pin
Dave Kreskowiak8-Apr-05 2:17
mveDave Kreskowiak8-Apr-05 2:17 
GeneralGrid To Grid And then Backto DB Pin
| Muhammad Waqas Butt |8-Apr-05 1:41
professional| Muhammad Waqas Butt |8-Apr-05 1:41 
GeneralCrystal reports Pin
V.8-Apr-05 1:02
professionalV.8-Apr-05 1:02 
QuestionHow to determine whether an assembly implements a certain interface? Pin
Sebastian Schneider8-Apr-05 0:54
Sebastian Schneider8-Apr-05 0:54 
AnswerRe: How to determine whether an assembly implements a certain interface? Pin
mav.northwind8-Apr-05 1:29
mav.northwind8-Apr-05 1:29 
QuestionStreams? Pin
Snowjim8-Apr-05 0:52
Snowjim8-Apr-05 0:52 
Hey!

If i Create a MemoryStrem, and write data to this stream at the folowing way

<br />
StreamWriter sw = new StreamWriter(StrmStore.getUnitStream); //Gets the MemoryStream<br />
sw.Write(data); //Writes the string to the stream<br />


And then i want to read the data in the stream from another part of the program that have access to this MemoryStream

<br />
char[] buffer = new char[memoryStream.Length];<br />
sr.Read(buffer, 0, (int)memoryStream.Length);<br />
<br />
string test = new string(buffer);<br />


The problem is that the position where the streamreader will read is set to the last element in the stream(probly by the stream writer that writed the data), and when the stream reader is reading it is not removing the readed elements?

What am i doing wrong? Maby i shold solve this problem another way?

BestRegards
Jimmy
AnswerRe: Streams? Pin
mav.northwind8-Apr-05 1:23
mav.northwind8-Apr-05 1:23 
GeneralRe: Streams? Pin
Snowjim8-Apr-05 1:43
Snowjim8-Apr-05 1:43 
GeneralRe: Streams? Pin
Snowjim8-Apr-05 1:55
Snowjim8-Apr-05 1:55 
Generalpicture in word document Pin
Anonymous7-Apr-05 22:53
Anonymous7-Apr-05 22:53 
GeneralList view & Rich text box PROBLEMO. Please Help Me!!! Pin
maheshfour7-Apr-05 22:45
maheshfour7-Apr-05 22:45 
GeneralRe: List view &amp; Rich text box PROBLEMO. Please Help Me!!! Pin
S. Senthil Kumar7-Apr-05 23:19
S. Senthil Kumar7-Apr-05 23:19 
GeneralRe: List view &amp; Rich text box PROBLEMO. Please Help Me!!! Pin
maheshfour7-Apr-05 23:33
maheshfour7-Apr-05 23:33 
GeneralRe: List view &amp; Rich text box PROBLEMO. Please Help Me!!! Pin
mav.northwind7-Apr-05 23:59
mav.northwind7-Apr-05 23:59 
GeneralRe: List view &amp; Rich text box PROBLEMO. Please Help Me!!! Pin
maheshfour8-Apr-05 0:26
maheshfour8-Apr-05 0:26 
GeneralRe: List view &amp; Rich text box PROBLEMO. Please Help Me!!! Pin
S. Senthil Kumar8-Apr-05 0:36
S. Senthil Kumar8-Apr-05 0:36 
GeneralRe:thanks Pin
maheshfour8-Apr-05 1:21
maheshfour8-Apr-05 1:21 
GeneralDatetime in C# type mm/yyyy Pin
hvan22037-Apr-05 22:15
hvan22037-Apr-05 22:15 
GeneralRe: Datetime in C# type mm/yyyy Pin
Sebastian Schneider7-Apr-05 23:18
Sebastian Schneider7-Apr-05 23:18 
Questionhow to use char** from C library to C# using P/Invoke. Pin
Shail_Srivastav7-Apr-05 22:10
Shail_Srivastav7-Apr-05 22:10 
AnswerRe: how to use char** from C library to C# using P/Invoke. Pin
bickel7-Apr-05 22:52
bickel7-Apr-05 22:52 
GeneralRe: how to use char** from C library to C# using P/Invoke. Pin
Shail_Srivastav8-Apr-05 1:41
Shail_Srivastav8-Apr-05 1:41 
GeneralRe: how to use char** from C library to C# using P/Invoke. Pin
Richard Deeming8-Apr-05 8:42
mveRichard Deeming8-Apr-05 8:42 

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.