Click here to Skip to main content
15,893,668 members
Home / Discussions / C#
   

C#

 
GeneralRe: A program to delete first n bytes in a file Pin
Giorgi Dalakishvili24-Nov-08 7:20
mentorGiorgi Dalakishvili24-Nov-08 7:20 
GeneralRe: A program to delete first n bytes in a file Pin
Matjaz-xyz24-Nov-08 19:42
Matjaz-xyz24-Nov-08 19:42 
GeneralRe: A program to delete first n bytes in a file Pin
Giorgi Dalakishvili24-Nov-08 20:02
mentorGiorgi Dalakishvili24-Nov-08 20:02 
GeneralRe: A program to delete first n bytes in a file Pin
Matjaz-xyz24-Nov-08 20:30
Matjaz-xyz24-Nov-08 20:30 
GeneralRe: A program to delete first n bytes in a file Pin
Giorgi Dalakishvili24-Nov-08 20:42
mentorGiorgi Dalakishvili24-Nov-08 20:42 
GeneralRe: A program to delete first n bytes in a file Pin
Matjaz-xyz24-Nov-08 21:24
Matjaz-xyz24-Nov-08 21:24 
GeneralRe: A program to delete first n bytes in a file Pin
Giorgi Dalakishvili24-Nov-08 21:28
mentorGiorgi Dalakishvili24-Nov-08 21:28 
GeneralRe: A program to delete first n bytes in a file Pin
Member 1519807030-Sep-22 23:31
Member 1519807030-Sep-22 23:31 
i used the code like this to pervent overflow:



string deletethis = "";
using (var reader = new StreamReader(@"C:\<>\U2\" + props["File"].Replace("%20", " ")))
{
deletethis = reader.ReadLine();
deletethis = deletethis + reader.ReadLine();
deletethis = deletethis + reader.ReadLine();
deletethis = deletethis + reader.ReadLine();
deletethis = deletethis + "ream" + Environment.NewLine+""+Environment.NewLine;
reader.Close();
reader.Dispose();
};
byte[] bytes = Encoding.ASCII.GetBytes(deletethis);
byte[] x = File.ReadAllBytes(@"C:\<>\U2\" + props["File"].Replace("%20", " "));
byte[] temp = new byte[x.Length - bytes.Length];
Int64 tempx = 0;
for (Int64 i = bytes.Length; i < x.LongLength; i++)
{
temp[tempx] = x[i];
tempx++;
}
File.WriteAllBytes(@"C:\<>\U2\" + props["File"].Replace("%20", " "), temp);
AnswerRe: A program to delete first n bytes in a file Pin
Giorgi Dalakishvili23-Nov-08 21:06
mentorGiorgi Dalakishvili23-Nov-08 21:06 
QuestionDisabling Button until thread complete Pin
K V Sekhar23-Nov-08 20:42
K V Sekhar23-Nov-08 20:42 
AnswerRe: Disabling Button until thread complete Pin
N a v a n e e t h23-Nov-08 20:45
N a v a n e e t h23-Nov-08 20:45 
GeneralRe: Disabling Button until thread complete Pin
K V Sekhar23-Nov-08 20:53
K V Sekhar23-Nov-08 20:53 
GeneralRe: Disabling Button until thread complete Pin
N a v a n e e t h23-Nov-08 20:56
N a v a n e e t h23-Nov-08 20:56 
AnswerRe: Disabling Button until thread complete Pin
Stephen Lintott23-Nov-08 20:47
Stephen Lintott23-Nov-08 20:47 
GeneralRe: Disabling Button until thread complete Pin
K V Sekhar23-Nov-08 20:54
K V Sekhar23-Nov-08 20:54 
AnswerRe: Disabling Button until thread complete Pin
Christian Graus23-Nov-08 20:51
protectorChristian Graus23-Nov-08 20:51 
GeneralRe: Disabling Button until thread complete Pin
K V Sekhar23-Nov-08 20:55
K V Sekhar23-Nov-08 20:55 
AnswerRe: Disabling Button until thread complete Pin
Giorgi Dalakishvili23-Nov-08 21:02
mentorGiorgi Dalakishvili23-Nov-08 21:02 
QuestionHow to create stored procedure through c# at runtime? Pin
S a n d y23-Nov-08 20:35
S a n d y23-Nov-08 20:35 
AnswerRe: How to create stored procedure through c# at runtime? Pin
N a v a n e e t h23-Nov-08 20:51
N a v a n e e t h23-Nov-08 20:51 
GeneralRe: How to create stored procedure through c# at runtime? Pin
S a n d y23-Nov-08 21:00
S a n d y23-Nov-08 21:00 
GeneralRe: How to create stored procedure through c# at runtime? Pin
N a v a n e e t h23-Nov-08 21:47
N a v a n e e t h23-Nov-08 21:47 
GeneralRe: How to create stored procedure through c# at runtime? Pin
S a n d y23-Nov-08 22:40
S a n d y23-Nov-08 22:40 
GeneralRe: How to create stored procedure through c# at runtime? Pin
James Simpson24-Nov-08 1:31
James Simpson24-Nov-08 1:31 
GeneralRe: How to create stored procedure through c# at runtime? Pin
S a n d y24-Nov-08 1:53
S a n d y24-Nov-08 1:53 

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.