c# - The expression being assigned to '....' must be constant -


what's wrong code? error: "the expression being assigned '....' must constant"

public const string connectionstring = system.io.file.readalltext(@"d:\connection.ini"); 

a constant value must known @ compile time, use readonly instead, have similar effect


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -