Assuming your textfile could have several of these entries and looks like:
name : TestEntry designation : Target1 salary : 2345
You could write this code:
private void Form1_Load(object sender, EventArgs e)
{
string[] lines = File.ReadAllLines(@"C:\Temp\Test.txt");
foreach( string str in lines )
{
string[] parts = str.Split(':');
if( parts.Length == 4 )
{
string name = parts[1].Substring(0, parts[0].IndexOf(' ') + 1).Remove(0,1);
parts[2] = parts[2].Remove(0, 1);
string designation = parts[2].Substring(0, parts[2].IndexOf(' ') + 1);
string salary = parts[3].Remove(0, 1);
MessageBox.Show("Name: " + name + " Designation: " + designation + " Salary: " + salary);
}
}
}