C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




Dynamic Password Creation Function using DateTime


Posted Date: 10 Mar 2008    Resource Type: Code Snippets    Category: C# Syntax

Posted By: Jessica       Member Level: Gold
Rating:     Points: 7



This function is used for creating dynamic password. The procedure involved is:

1. Take Current DateTime and replace "/" with ' '.
2. Replace ":" by ' '
3.Take string[] and extract each char in string variable.
4.Return the new password.



public string CreatePassword()
{
char[] delimitspace = { ' ' };
string dateTimenew = System.DateTime.Now.ToString().Replace('/', ' ');
string dateTime = dateTimenew.Replace(':', ' ');
string[] substring1 = dateTime.Split(delimitspace);
string appenddatetime = "", appenddate = "";
for (int i = 0; i < substring1.Length - 1; i++)
{
appenddatetime += substring1[i];
}
appenddate = Convert.ToString(appenddatetime);
return appenddate;
}





Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Use DateTime to Generate Passwords  .  Password Generator  .  Generate Random Passwords  .  Generate Passwords using DateTime  .  Generate Passwords  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: To to find date difference in C#
Previous Resource: Generate Cookie for Remember me(At Login time)
Return to Discussion Resource Index
Post New Resource
Category: C# Syntax


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design

doors in nj

Contact Us    Privacy Policy    Terms Of Use