private bool editaVcard(string mensaje)
{
string LogFile = "vcard.vcf";
string linea1 = "BEGIN:VCARD";
string linea2 = "VERSION:2.1";
string linea3 = "N:GANDALF";
string linea4 = "NOTE;ENCODING=QUOTED-PRINTABLE: " + mensaje;
string linea5 = "END:VCARD";
StreamWriter temp= File.CreateText(LogFile);
temp.Close();
StreamWriter sw = File.AppendText(LogFile);
try
{
sw.WriteLine(linea1);
sw.WriteLine(linea2);
sw.WriteLine(linea3);
sw.WriteLine(linea4);
sw.WriteLine(linea5);
return true;
}
catch
{
return false;
}
finally
{
sw.Flush();
sw.Close();
}
}