Put a string between double quotes. - CSharp System

CSharp examples for System:String Quote

Description

Put a string between double quotes.

Demo Code


using System;/*from   w w w. jav  a2 s. c om*/

public class Main{
        /// <summary>
        ///     Put a string between double quotes.
        /// </summary>
        /// <param name="value">Value to be put between double quotes ex: foo</param>
        /// <returns>double quoted string ex: "foo"</returns>
        public static string PutIntoQuotes(this string value)
        {
            return "\"" + value + "\"";
        }
}

Related Tutorials