recentpopularlog in

adrianoconnor : c#   86

« earlier  
visual studio - Input string was not in a correct format exception in NuGet - Stack Overflow
regsvr32 "C:\Program Files (x86)\Common Files\microsoft shared\MSEnv\VsLangproj.olb"
nuget  visualstudio  c# 
september 2016 by adrianoconnor
How do I calculate a MD5 hash from a string? | C# Frequently Asked Questions
byte[] inputBytes = System.Text.Encoding.ASCII.GetBytes(input);
byte[] hash = md5.ComputeHash(inputBytes);

// step 2, convert byte array to hex string

StringBuilder sb = new StringBuilder();

for (int i = 0; i < hash.Length; i++)

{

sb.Append(hash[i].ToString(“X2”));

}

return sb.ToString();
md5  c# 
july 2016 by adrianoconnor
c# - Format XML String to Print Friendly XML String - Stack Overflow
static string PrettyXml(string xml)
{
var stringBuilder = new StringBuilder();

var element = XElement.Parse(xml);

var settings = new XmlWriterSettings();
settings.OmitXmlDeclaration = true;
settings.Indent = true;
settings.NewLineOnAttributes = true;

using (var xmlWriter = XmlWriter.Create(stringBuilder, settings))
{
element.Save(xmlWriter);
}

return stringBuilder.ToString();
}
xml  prettify  code  c#  dotnet 
may 2016 by adrianoconnor
« earlier      
per page:    204080120160

Copy this bookmark:





to read