All Questions
Tagged with stringwriter stringreader
4 questions
0
votes
1
answer
99
views
C# 10 (De)Serialize XML property value AND attributes using StringWriter, StringReader and XmlSerializer [duplicate]
How do I (de)serialize the following xml element:
<OtherInfo name=\"Some Name\" type=\"text\">Hello World!!!\n</OtherInfo>
I define the following class to take care of ...
1
vote
2
answers
451
views
Get parts of a string - C# .NET Core 3.1
I have a string line from a log:
2020-09-07 14:41:17.268 +01:00 [Information] Hello, Serilog!
I would like to pull out the word Information from the string, however, this will change as it could be ...
6
votes
4
answers
28k
views
C# Read text file line by line and edit specific line
I want to read a text file line by line and edit a specific line. So, I have put the text file into a string variable like:
string textFile = File.ReadAllText(filename);
My text file is like:
Line ...
0
votes
5
answers
2k
views
Reading and Writing from a txt file?
I am creating a game with c# and i have occurred a problem. I want my game to save curtain labels to a txt file here ill give you a example:
Label1.Text = "Character Name: "
Label2.Text = "Level: "
...