C# join metodu()

Posted: July 8, 2014 in C#
Tags:

Dizi degiskeninin elemanların String sınıfının join metotuyla birleştirmek mümkündür.

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 WindowsFormsApplication14
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)
{

string[] ogrenci = new string[3];
ogrenci[0] = “Bayram”;
ogrenci[1] = “Zafer”;
ogrenci[2] = “Cihad”;

string tüm = string.Join(“:”, ogrenci);

MessageBox.Show(tüm.ToString());

}
}
}

Butona bastıgımızda join metodu devreye girdi.Ayrac olarak : isareti kullandık.

join

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s