471,049 Members | 1,618 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,049 software developers and data experts.

How to give file new name ?

1
Hello, im trying to create new file and rename but without success can some one tell me how to do it

public void savebytetobinary(int address, byte data, string filename)
{
FileStream fsi1 = File.OpenWrite(filename);
BinaryWriter bw1 = new BinaryWriter(fsi1);
fsi1.Position = address;
bw1.Write((byte)data);
fsi1.Flush();
bw1.Close();
fsi1.Close();
fsi1.Dispose();
}
Jul 19 '21 #1
1 2176
dev7060
581 Expert 512MB
Hello, im trying to create new file and rename but without success can some one tell me how to do it
What's the error? ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎
Jul 19 '21 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

8 posts views Thread by Fu Bo Xia | last post: by
1 post views Thread by Luke Airig | last post: by
3 posts views Thread by Reginald Blue | last post: by
1 post views Thread by MarkWH | last post: by
1 post views Thread by nicknack | last post: by
185 posts views Thread by jacob navia | last post: by
9 posts views Thread by ashokd001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.