Breaking News
Loading...
Saturday 23 February 2013

How to use Copy function c#.net

Copy :
"This function copy the one string to second string ."

How to Use :

  string  string.Copy(string str)

Input Parameter :
         str1 = (string)
         str2 = (string)

Output Parameter :
       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 Copy
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        private void button1_Click(object sender, EventArgs e)
        {
            string str1 = null;
            string str2 = null;

            str1 = "Nira daraniya";
            str2 = string.Copy(str1);

            MessageBox.Show(str2);
        }
    }
}

//////////////////////////////  OUTPUT   /////////////////////////
Nira daraniya

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


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

0 comments:

Post a Comment

Thanks for comment

 
Toggle Footer