Remove accent of a string
éèàçùö =>eeacuo
private string ConvertToRemovedAccentAndLowerCase(string txt)
{
byte[] bytes = System.Text.Encoding.GetEncoding("Cyrillic").GetBytes(txt);
return System.Text.Encoding.ASCII.GetString(bytes);
}
22 mars 2007
Remove accents
Remove accent of a string
éèàçùö =>eeacuo
private string ConvertToRemovedAccentAndLowerCase(string txt)
{
byte[] bytes = System.Text.Encoding.GetEncoding("Cyrillic").GetBytes(txt);
return System.Text.Encoding.ASCII.GetString(bytes);
}
éèàçùö =>eeacuo
private string ConvertToRemovedAccentAndLowerCase(string txt)
{
byte[] bytes = System.Text.Encoding.GetEncoding("Cyrillic").GetBytes(txt);
return System.Text.Encoding.ASCII.GetString(bytes);
}
21 mars 2007
FxCopCmd.exe Error code 65
Exit code 65 means that analysis errors occured (exit code 1) and that the report could not be written (64). This probably is happening because the solution folder is not writable. Check if the solution folder for the website (commonly under My Documents\Visual Studio 2005\Solutions) is read only or has security restrictions.
The file generated is for example "CodeAnalysisLog.xml" in a directory like "{123ABCDE21-......}"
14 mars 2007
Sorted files by LastWriteTime
private static List SortFilesByLastWriteTime(string path, string filter)
{
FileInfo[] fi = new DirectoryInfo(path).GetFiles(filter);
List fis = new List();
fis.AddRange(fi);
fis.Sort(new Comparison(
delegate(FileInfo f1, FileInfo f2)
{
return f1.LastWriteTime.CompareTo(f2.LastWriteTime);
}));
return fis;
}
{
FileInfo[] fi = new DirectoryInfo(path).GetFiles(filter);
List
fis.AddRange(fi);
fis.Sort(new Comparison
delegate(FileInfo f1, FileInfo f2)
{
return f1.LastWriteTime.CompareTo(f2.LastWriteTime);
}));
return fis;
}
Inscription à :
Articles (Atom)