How to include whitespace in C# code
I am making application, in which i have lot of column in sql but in one column i want to store data using whitespace like my data is "what is variable and when we declare variable" but in database it should be store "what_is_variable_and_when_we_declare_variable". in this manner. what is the code in C# to include "underscore _" in program.
Kunal VaishyaPosted May 3, 2012, 2:46 AM
use this string like this
const string s = "what is variable and when we declare variable";
string v = s.Replace(" ", "_");
at the fetching time use like this
const string s = "what_is_variable_and_when_we_declare_variable";
string v = s.Replace("_", ",");