Hi this is a basic sample shows how to create and hide a Directory in C#
Success is a journey , It’s not a destination
Today i decided to create an application using C# which clears the temp folder when ever windows startup.So no need to clear your temp file always.
Here is the code what i have tried:
RegistryKey regKey = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Run", true);
regKey.SetValue(Application.ProductName, Application.ExecutablePath);
string path = Path.GetTempPath();
if (!string.IsNullOrWhiteSpace (path))
{
DirectoryInfo d = new DirectoryInfo(path);
Array.ForEach(Directory.GetFiles(path), s =>
{ try { label1.Text = s; File.Delete(s); } catch (Exception ex) { } });
label1.Text = "Done";
}
Today i have seen a thread in my favorite site Stackoverflow on Twitter. So i decided to create a small Twitter API WCF application.
Twitter is designed on REST architecture. Here is a sample code to integrate the Twitter in C#.
Download the TweetSharp
To Authenticate user in the Twitter:
ITwitterLeafNode twitter =FluentTwitter.CreateRequest()
.AuthenticateAs(StaticProperties.Username, StaticProperties.Password)
.Account().VerifyCredentials().AsJson();
if (twitter.Request().ResponseHttpStatusDescription == "OK")
{
}
ITwitterLeafNode twitter =FluentTwitter.CreateRequest()
.AuthenticateAs(StaticProperties.Username,StaticProperties.Password)
.Statuses().Update("Hello World).AsJson();
var request = twitter.Request();