Declaring strings public static readonly versus public const versus public static const

In each project we have there is a file used to store the various SQL statements used in that project. There are a handful of variations on how the class is declared and how the strings are declared.

Example class declartions:

internal sealed class ClassName
internal static class ClassName
public sealed class ClassName
public static class ClassName
internal class ClassName

Example string declarations:

internal const string stringName
internal static string stringName
public static readonly string stringName
public static string stringName
public const string stringName

I don't understand what the performance implications are between the different declarations. Is there a best practice for this situation/scenario?

34
задан Ryan Rodemoyer 9 December 2010 в 20:13
поделиться