Método Clone String:
Criado para manter permanentemente uma referência ao estado inicial de uma string, por exemplo.
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 WindowsFormsApplication5{public partial class Form1 : Form{public Form1(){InitializeComponent();}private void kryptonButton1_Click(object sender, EventArgs e){string str = "Clone() Test" ;string clonedString = null ;clonedString = (String )str.Clone();MessageBox .Show(clonedString);}}}

0 comentários:
Postar um comentário