using System;
using System.Data;
using System.Data.SqlClient;
class Program
{
static void Main(string[] args)
{
string sqlConnectString = "Data Source=(local);Integrated security=SSPI;Initial Catalog=AdventureWorks;";
string sqlSelect = "SELECT * FROM dbo.ufnGetContactInformation(10)";
SqlDataAdapter da = new SqlDataAdapter(sqlSelect, sqlConnectString);
DataTable dt = new DataTable( );
da.Fill(dt);
foreach (DataColumn col in dt.Columns)
{
Console.WriteLine("{0} = {1}",col.ColumnName, dt.Rows[0][col.Ordinal]);
}
}
}