Check the follwoing Link
http://www.dotnetspider.com/resources/28921-Shortcut-Keys-Edit-Menu-VS.aspx
Monday, June 8, 2009
Organize Usings
Once we have created our class. In that class we use the using statment at the top of the class.To include namespaces in our class. But sometimes we realize after compeleting the code of that calss we have used some extra namespaces which are of no use in th class to remove all those unused using statment. we can use InteliSense in the edit menu. in the submenu of InteliSense we will find the option organize usings. and in its sub menu we hve the options to remove unused usings to sort usings and to remove and sort usings.
Thanks and Regards
Meetu Choudhary
Thanks and Regards
Meetu Choudhary
Labels:
meetu,
meetu choudhary,
organize using,
organize usings
Friday, June 5, 2009
Format document
To format any document (.cs,XML,aspx,HTML etc) in visual studio 2008
use the following key combinations:
To format whole document : ctrl +k ,(followed by) ctrl + d
To format the selection : ctrl +k, (followed by) ctrl +f
Thanks and Regards
Meetu Choudhary
use the following key combinations:
To format whole document : ctrl +k ,(followed by) ctrl + d
To format the selection : ctrl +k, (followed by) ctrl +f
Thanks and Regards
Meetu Choudhary
Labels:
format document,
meetu,
meetu choudhary
Wednesday, June 3, 2009
Accessing the properties of a digital signature
Accessing the properties of a digital signature
Now once we have selected the certificate. We need to access the properties of the certificate. Here is a small piece of code to access all the properties which may be helpful to us for any context.
before accessing these properties we have to set the certificate object. for that you can get the code from any of the two previous articles.
1. Article link , Mirror link
2. Article link , Mirror link
Now once we have the certificate (X509Certificate2 x509_2;)
we can o with the following code
[code]
///
/// Set All the Properties of the Certificate
///
public Boolean SetProperties()
{
if (x509_2 != null)
{
RSACryptoServiceProvider rsa = (RSACryptoServiceProvider)x509_2.PublicKey.Key;
_PublicKey_Key =_PublicKeyXML = rsa.ToXmlString(false);
//_PrivateKeyXML = rsa.ToXmlString(true );
_PrivateKeyXML=_Private_Key = x509_2.PrivateKey.ToXmlString(false);
_PKeyExchangeAlgorithm = x509_2.PrivateKey.KeyExchangeAlgorithm;
_PublicKey = x509_2.GetPublicKeyString();
//_PublicKey_Key = Convert.ToString(x509_2.PublicKey.Key);
_SerialNumber = x509_2.GetPublicKeyString();
_Thumbprint = x509_2.Thumbprint;
_RawCertDataString = x509_2.GetRawCertDataString();
_FriendlyName = x509_2.FriendlyName;
_HashString = x509_2.GetCertHashString();
_EffectiveDate = x509_2.GetEffectiveDateString();
_ExpirationDate = x509_2.GetExpirationDateString();
_Format = x509_2.GetFormat();
_IssuerName = x509_2.GetIssuerName();
_KeyAlgorithm = x509_2.GetKeyAlgorithm();
_KeyAlgorithmParameters = x509_2.GetKeyAlgorithmParametersString();
_CertName = x509_2.GetName();
_CertSubject = x509_2.Subject;
_CertVersion = x509_2.Version;
_SignatureAlgorithm_Value = x509_2.SignatureAlgorithm.Value;
_SignatureAlgorithm_ToString = x509_2.SignatureAlgorithm.ToString();
_SignatureAlgorithm_FriendlyName = x509_2.SignatureAlgorithm.FriendlyName;
return true;
}
else { return false; }
}
[/code]
Thanks and Regards
Meetu Choudhary
Subscribe to:
Posts (Atom)
Subscribe via email
MSDotnetMentor
MSDotnetMentor
My Website
http://msdotnetmentor.com