How to use Concat methode in c#.net

Concat :

"This methode will add or sum or join two string and give single string as an output "

How to Use :


        String str = string.Concat( String str1,String str2)

Input Parameter :

         str1 = (string)
         str2 = (string)

Output Parameter :

         str = (string)


Example  :: 

/////////////////////////  CODE   /////////////////////

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace StringConcat
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            string str1 = "Nirav";
            string str2 = "Daraniya";
            string str = "";

            str = string.Concat(str1, str2);
            MessageBox.Show(str);
        }
    }
}


////////////////////////////////  OUTPUT   //////////////////////////////

NiravDaraniya

//////////////////////////////////////////////////////////////////////////////////





--
/\/ir@\/  <(.'.)>

Comments

Popular posts from this blog

How to make and use web service in Microsoft Dynamics Navision.

How to use Format function in Microsoft Dynamics Navision.

How to create simple report in Microsoft Dynamics Navision.