The below will help you get the full path of a Windows shortcut (.lnk) in your program. The below examples specifically create a command-line executable file but you could use the function in your program just as well. View the full code in GitHub at https://github.com/dkittell/lnk-parser VB.Net example converted from…
Category: CSharp
C# – Windows Phone 8 – SMS Via Program
GitHub: https://gist.github.com/dkittell/025bfa7e07b7a052eee6 Reference/Credit: http://abundantcode.com/how-to-send-sms-in-windows-phone-8-programatically-using-c/
System.Globalization String Format
Recently I was asked to format a string into a different format, after some discussion they wanted the integer 500000 to show in a format attributed to India that looks like 5,00,000 The code below shows how best to convert the number, to see the code in action go to…
Proxy Switch
Recently had a need to be able to switch on/off proxy at will and got tired of going to Internet Explorer options to set/change it. Hopefully someone else will get benefit from this nice tool. Open Visual Studio File -> New Project -> Visual C# – Windows -> Windows Forms…
JSON From Web
Use NuGet, search and install “Json.net” from Newtonsoft Visit json2csharp.com with the sample Json formatted text. json2csharp will create the public class for your json file/text Paste your Json text into the text box and click on the “Generate” button Copy the generated class into your code Create a dataGridView…
Google Maps API XML
This will get you the latitude and longitude of an address. Note: After testing you should add you’re specific Google API key.
Send Authenticated Email – Console Application
Depending on your needs I would put the email settings in an app.config file rather than in the exe but for testing this will do what it needs to.
AES Encrypted SSO
Passing information between one site and another is becoming more and more common but how can you do it without exposing confidential data? Below are some examples of how you can encrypt text and then decrypt it on the other end. C# to C# Once you get to the destination…