
Originally Posted by
bergerkiller
I know, it was made when I first started coding .NET

It was working, so I didn't mind changing it.
I actually need some sort of way to represent the strings used. Since storing it in a file brings the read speed factor, it has to be stored in memory.
I managed to get some sort of resolution:
Code:
Public Class Information
Public Shared ReadOnly Property HelpInfoErrorSupport()
Get
Return "If you need error support, you can visit our website." _
& vbCrLf & "The website is displayed in the 'about' tab." _
& vbCrLf & "You can post your findings and requests there."
End Get
End Property
Public Shared ReadOnly Property HelpInfoInstallationPath()
Get
Return "In order to use LPP Modlauncher, the Battlefield 2/2142 Installation path must be set." _
& vbCrLf & "You can use the path of the Demo version."
End Get
End Property
End Class
Code:
MessageBox.Show(Information.HelpInfoErrorSupport, "Error Support", MessageBoxButtons.OK, MessageBoxIcon.Information)
But I am actually more interested in what you guys would do. Say, you have to display changing information in your program or you want to use "localization" (different languages).
I just can't believe anyone would use arrays to represent their information...

This code won't even compile, so I assume it was just an example.
This worked
Code:
Public Class Information
Private Shared ReadOnly _HelpInfoErrorSupport As String = String.Join(Environment.NewLine, New String() _
{"If you need error support, you can visit our website.", _
"The website is displayed in the 'about' tab.", _
"You can post your findings and requests there."})
Private Shared ReadOnly _HelpInfoInstallationPath As String = String.Join(Environment.NewLine, New String() _
{"In order to use LPP Modlauncher, the Battlefield 2/2142 Installation path must be set.", _
"You can use the path of the Demo version."})
Public ReadOnly Property HelpInfoErrorSupport() As String
Get
Return _HelpInfoErrorSupport
End Get
End Property
Public ReadOnly Property HelpInfoInstallationPath() As String
Get
Return _HelpInfoInstallationPath
End Get
End Property
End Class
If this were me I would have an XML file
Code:
<Messages>
<Message>
<Name>Name_of_the_message</Name>
<text>Message text</text>
</Message>
<Message>
<Name>Name_of_the_message</Name>
<text>Message text</text>
</Message>
</Messages>
Unless the number of messages is incredibly large the file access time would be negligible.