Click here to Skip to main content
16,021,911 members
Home / Discussions / C#
   

C#

 
GeneralRe: limiting recursion as two interdependent values change c# Pin
harold aptroot28-Aug-23 12:36
harold aptroot28-Aug-23 12:36 
GeneralRe: limiting recursion as two interdependent values change c# Pin
BillWoodruff28-Aug-23 22:48
professionalBillWoodruff28-Aug-23 22:48 
QuestionC# error when I try to run Pin
Member 1607362720-Aug-23 18:22
Member 1607362720-Aug-23 18:22 
AnswerRe: C# error when I try to run Pin
OriginalGriff20-Aug-23 18:27
mveOriginalGriff20-Aug-23 18:27 
AnswerRe: C# error when I try to run Pin
Richard Deeming20-Aug-23 21:01
mveRichard Deeming20-Aug-23 21:01 
QuestionHikVision Biometrics Pin
Icanus Tuiloma20-Aug-23 14:48
Icanus Tuiloma20-Aug-23 14:48 
AnswerRe: HikVision Biometrics Pin
Dave Kreskowiak20-Aug-23 17:16
mveDave Kreskowiak20-Aug-23 17:16 
GeneralRe: HikVision Biometrics Pin
Icanus Tuiloma20-Aug-23 18:11
Icanus Tuiloma20-Aug-23 18:11 
QuestionFormat integer with ToString("D2") in SqLite Pin
Edilson Lemos 202118-Aug-23 16:21
Edilson Lemos 202118-Aug-23 16:21 
AnswerRe: Format integer with ToString("D2") in SqLite Pin
Dave Kreskowiak18-Aug-23 16:52
mveDave Kreskowiak18-Aug-23 16:52 
GeneralRe: Format integer with ToString("D2") in SqLite Pin
Edilson Lemos 202118-Aug-23 17:36
Edilson Lemos 202118-Aug-23 17:36 
AnswerRe: Format integer with ToString("D2") in SqLite Pin
OriginalGriff18-Aug-23 18:31
mveOriginalGriff18-Aug-23 18:31 
QuestionFile csproj : how to create a nuget package with msbuild and with package dependencies ? Pin
chris_brabant16-Aug-23 1:42
chris_brabant16-Aug-23 1:42 
AnswerRe: File csproj : how to create a nuget package with msbuild and with package dependencies ? Pin
Richard Deeming16-Aug-23 3:11
mveRichard Deeming16-Aug-23 3:11 
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 

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.