Click here to Skip to main content
15,878,970 members
Home / Discussions / C#
   

C#

 
AnswerRe: how to show gif image on toolbar? Pin
Luis Alonso Ramos27-Sep-02 4:36
Luis Alonso Ramos27-Sep-02 4:36 
Generalctl+c problem Pin
Anonymous26-Sep-02 9:53
Anonymous26-Sep-02 9:53 
GeneralAccessing data in one assembly from another Pin
ez226-Sep-02 9:30
ez226-Sep-02 9:30 
GeneralRe: Accessing data in one assembly from another Pin
leppie26-Sep-02 10:41
leppie26-Sep-02 10:41 
GeneralCopy of files from one folder to another Pin
Cintch26-Sep-02 6:05
Cintch26-Sep-02 6:05 
GeneralRe: Copy of files from one folder to another Pin
leppie26-Sep-02 10:53
leppie26-Sep-02 10:53 
General[Remoting]No receiver registered Pin
Ricciolo26-Sep-02 5:50
Ricciolo26-Sep-02 5:50 
Generalnull characters when outputing string to file Pin
Humpo26-Sep-02 5:18
Humpo26-Sep-02 5:18 
(the relevent code- i think)
Data is a char array of the last 128 bytes of an mp3 file.

String title = new String(data, MP3_TITLE_OFFSET, MP3_TITLE_LENGTH).Trim();
sw = new StreamWriter(fs);
sw.Write(title);
sw.Flush();
sw.Close();

Example problem: title of the mp3 = "intro", but i created a string with 30 bytes(the possible length of a title) so have a string with 25 null characters.
In debug mode, length of title is 5 and doesnt show the null characters.
When title is outputed to a file the 25 null characters are also ouputed.

How do i remove these null characters from the string?

Thanks!
GeneralRe: null characters when outputing string to file Pin
Stephane Rodriguez.26-Sep-02 5:42
Stephane Rodriguez.26-Sep-02 5:42 
GeneralRe: null characters when outputing string to file Pin
leppie26-Sep-02 11:00
leppie26-Sep-02 11:00 
GeneralRe: null characters when outputing string to file Pin
Humpo27-Sep-02 1:21
Humpo27-Sep-02 1:21 
GeneralRe: null characters when outputing string to file Pin
leppie27-Sep-02 2:27
leppie27-Sep-02 2:27 
GeneralRe: null characters when outputing string to file Pin
Humpo27-Sep-02 3:59
Humpo27-Sep-02 3:59 
GeneralIncomplete information when exception is thrown Pin
567890123425-Sep-02 21:33
567890123425-Sep-02 21:33 
GeneralData type list for WinAPI use Pin
Raiko25-Sep-02 19:20
Raiko25-Sep-02 19:20 
GeneralRe: Data type list for WinAPI use Pin
Stephane Rodriguez.25-Sep-02 20:09
Stephane Rodriguez.25-Sep-02 20:09 
GeneralRe: Data type list for WinAPI use Pin
Mazdak25-Sep-02 20:26
Mazdak25-Sep-02 20:26 
GeneralRe: Data type list for WinAPI use Pin
leppie26-Sep-02 0:40
leppie26-Sep-02 0:40 
GeneralRe: Data type list for WinAPI use Pin
Raiko26-Sep-02 6:08
Raiko26-Sep-02 6:08 
GeneralRe: Data type list for WinAPI use Pin
Stephane Rodriguez.26-Sep-02 6:38
Stephane Rodriguez.26-Sep-02 6:38 
GeneralRe: Data type list for WinAPI use Pin
leppie26-Sep-02 7:12
leppie26-Sep-02 7:12 
Questionhow can i convert VC++6 's Resources files to C# 's Resources Pin
bclangren25-Sep-02 18:31
bclangren25-Sep-02 18:31 
AnswerRe: how can i convert VC++6 's Resources files to C# 's Resources Pin
Stephane Rodriguez.25-Sep-02 20:27
Stephane Rodriguez.25-Sep-02 20:27 
GeneralApplication.StartupPath.ToString(); Pin
Nick Parker25-Sep-02 17:25
protectorNick Parker25-Sep-02 17:25 
GeneralRe: Application.StartupPath.ToString(); Pin
James McCutcheon25-Sep-02 19:59
James McCutcheon25-Sep-02 19:59 

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.