© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
24 replies
Wasabi2320

❔ How do I add a textfile into my list

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Filhantering
{
class Bil
{
private string regNr;
private string märke;
private string modell;
private string årsmodell;


public string RegNr
{
get { return regNr; }
set { regNr = value; }
}
public string Märke
{
get { return märke; }
set { märke = value; }
}
public string Modell
{
get { return modell; }
set { modell = value; }
}
public string Årsmodell
{
get { return årsmodell; }
set { årsmodell = value; }
}
public Bil(string regNr1, string märke1, string modell1, string årsmodell1)
{
;
this.RegNr = regNr1;
this.Märke = märke1;
this.Modell = modell1;
this.Årsmodell = årsmodell1;
}
public override string ToString()
{
return " " + this.regNr + " " + this.Märke + " " + this.Modell + " " + this.Årsmodell;
}
}
}
message.txt5.21KB
bil.txt387B
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

How do I add strings to a list?
C#CC# / help
2y ago
✅ How to add a textfile in monogame pipeline(MONOGAME)
C#CC# / help
17mo ago
How can I insert my sortedlist into a listbox?
C#CC# / help
3y ago
Reading from a textfile
C#CC# / help
2y ago