System.Data.Common.DbCommandBuilder.QuoteIdentifier C# (CSharp) Method

QuoteIdentifier() public method

public QuoteIdentifier ( string unquotedIdentifier ) : string
unquotedIdentifier string
return string
        public virtual string QuoteIdentifier(string unquotedIdentifier)
        {
            throw ADP.NotSupported();
        }

Usage Example

        private static string CreateColumnList(DbCommandBuilder commandBuilder, IEnumerable<string> columns)
        {
            var builder = new StringBuilder();

            foreach (string column in columns)
            {
                builder.Append(commandBuilder.QuoteIdentifier(column));
                builder.Append(',');
            }

            builder.Remove(builder.Length - 1, 1);

            return builder.ToString();
        }