Click here to Skip to main content
15,945,347 members
Home / Discussions / C#
   

C#

 
GeneralRe: File csproj : how to create a nuget package with msbuild and with package dependencies ? Pin
chris_brabant16-Aug-23 4:00
chris_brabant16-Aug-23 4:00 
GeneralRe: File csproj : how to create a nuget package with msbuild and with package dependencies ? Pin
Richard Deeming16-Aug-23 4:14
mveRichard Deeming16-Aug-23 4:14 
GeneralRe: File csproj : how to create a nuget package with msbuild and with package dependencies ? Pin
chris_brabant16-Aug-23 4:48
chris_brabant16-Aug-23 4:48 
GeneralRe: File csproj : how to create a nuget package with msbuild and with package dependencies ? Pin
Richard Deeming16-Aug-23 21:14
mveRichard Deeming16-Aug-23 21:14 
GeneralRe: File csproj : how to create a nuget package with msbuild and with package dependencies ? Pin
chris_brabant16-Aug-23 21:33
chris_brabant16-Aug-23 21:33 
GeneralRe: File csproj : how to create a nuget package with msbuild and with package dependencies ? Pin
Richard Deeming16-Aug-23 21:52
mveRichard Deeming16-Aug-23 21:52 
Questionhow to edit and delete lines from a text file Pin
Edilson Lemos 202112-Aug-23 12:36
Edilson Lemos 202112-Aug-23 12:36 
AnswerRe: how to edit and delete lines from a text file PinPopular
OriginalGriff12-Aug-23 19:01
mveOriginalGriff12-Aug-23 19:01 
Text files don't have lines: they have an "end of line" symbol which is recognised by the application and interpreted as line end marker - for C# apps, that is normally "\n" or occasionally "\r\n" for some systems. They are stored by the operating as binary data that just happens to be "human readable".

That means that you can't "delete", "add", or even "change" a "Line" in a text file: to do any of that, you have to create a new file, copy everything up to the change point over, then write you new line to the output file (insert a line), skip over a line in the input file (delete a line) or do both (change a line), then copy the rest of the file over, close both files, delete the original, and rename the new one to the old file name.

This is considerably more work than using a database, and much more prone to errors! And if this is a multiuser file you are playing with, you are going to have to handle all of the fun-and-games that comes with that yourself as well, and that really isn't trivial at all!

I'd strongly suggest that you don't go down this route: it's a complicated solution to a relatively simple problem ...
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!

GeneralRe: how to edit and delete lines from a text file Pin
Edilson Lemos 202113-Aug-23 11:15
Edilson Lemos 202113-Aug-23 11:15 
GeneralRe: how to edit and delete lines from a text file Pin
OriginalGriff13-Aug-23 19:08
mveOriginalGriff13-Aug-23 19:08 
AnswerRe: how to edit and delete lines from a text file Pin
Gerry Schmitz13-Aug-23 5:53
mveGerry Schmitz13-Aug-23 5:53 
AnswerRe: how to edit and delete lines from a text file Pin
jschell14-Aug-23 6:07
jschell14-Aug-23 6:07 
Questionthen the new student submits their answer to ... Pin
BillWoodruff8-Aug-23 4:23
professionalBillWoodruff8-Aug-23 4:23 
AnswerRe: then the new student submits their answer to ... Pin
Pete O'Hanlon8-Aug-23 19:33
mvePete O'Hanlon8-Aug-23 19:33 
GeneralRe: then the new student submits their answer to ... Pin
BillWoodruff10-Aug-23 0:36
professionalBillWoodruff10-Aug-23 0:36 
GeneralRe: then the new student submits their answer to ... Pin
Pete O'Hanlon10-Aug-23 3:29
mvePete O'Hanlon10-Aug-23 3:29 
GeneralRe: then the new student submits their answer to ... Pin
BillWoodruff10-Aug-23 2:09
professionalBillWoodruff10-Aug-23 2:09 
GeneralRe: then the new student submits their answer to ... Pin
Richard MacCutchan10-Aug-23 2:26
mveRichard MacCutchan10-Aug-23 2:26 
GeneralRe: then the new student submits their answer to ... Pin
Richard Deeming10-Aug-23 2:42
mveRichard Deeming10-Aug-23 2:42 
GeneralRe: then the new student submits their answer to ... Pin
BillWoodruff10-Aug-23 12:38
professionalBillWoodruff10-Aug-23 12:38 
GeneralRe: then the new student submits their answer to ... Pin
Richard Deeming10-Aug-23 21:27
mveRichard Deeming10-Aug-23 21:27 
GeneralRe: then the new student submits their answer to ... Pin
Richard Deeming10-Aug-23 23:27
mveRichard Deeming10-Aug-23 23:27 
GeneralRe: then the new student submits their answer to ... Pin
Sandeep Mewara12-Aug-23 17:26
mveSandeep Mewara12-Aug-23 17:26 
QuestionCount DataGridview row values and compare with an Array (Resolved) Pin
Edilson Lemos 20217-Aug-23 14:21
Edilson Lemos 20217-Aug-23 14:21 
AnswerRe: Count DataGridview row values and compare with an Array Pin
OriginalGriff7-Aug-23 19:56
mveOriginalGriff7-Aug-23 19:56 

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.