Archive for the ‘MCPD’ category

What is the ToolStrip control?

September 2nd, 2009

The ToolStrip control is a special control that is used to create professional looking and highly optimized toolbars, status bars, and menus in a Windows form. It can host ToolStripItem controls, which are similar to common controls such as Button, Label, and ComboBox. However, ToolStripItem controls are specifically designed to be hosted in the ToolStrip control.

Like this post? Share it with others
If you like this article, please leave a comment or subscribe this blog via RSS or via e-mail, Bookmark and share through your network. Click the AddThis button below. Thanks.
  • Share/Bookmark

What is unboxing?

September 1st, 2009

Unboxing is the inverse of boxing. Unboxing is used to explicitly convert reference type to value type. An unboxing operation consists of the following two actions:

  • Checking the object instance to make sure it is a boxed value of the given value type.
  • Copying the value from the instance into the value type variable.

The following statements will demonstrate an unboxing operation:

int test=457;                 //A value type
object obj=test;            //A reference type
int result=(int) obj;      //Unboxing

The unboxing conversion to a given value will succeed at runtime. This is possible only if the source argument is a reference to an object that is compatible and not null. Otherwise, an InvalidCastException is thrown.

Like this post? Share it with others
If you like this article, please leave a comment or subscribe this blog via RSS or via e-mail, Bookmark and share through your network. Click the AddThis button below. Thanks.
  • Share/Bookmark

What is Cryptosystem?

September 1st, 2009

Cryptosystem is a computer system that implements cryptography. It is used to secure email, digital signature, hash function, and key management. It consists of three algorithms, which are as follows:

  • Key Generation Algorithm: It generates secret key.
  • Encryption Algorithm: It converts plain text to cipher text.
  • Decryption Algorithm: It converts cipher text to plain text.
Like this post? Share it with others
If you like this article, please leave a comment or subscribe this blog via RSS or via e-mail, Bookmark and share through your network. Click the AddThis button below. Thanks.
  • Share/Bookmark

What are the differences between the SortedList and SortedDictionary generic classes?

September 1st, 2009

The differences between the SortedList and SortedDictionary generic classes are as follows:

SortedList generic class SortedDictionary generic class
It uses a lesser amount of memory. It uses a larger amount of memory.
It is faster if the list is already populated with sorted data. It is slower if the list is already populated with sorted data.
It allows efficient indexed retrieval. It does not allow indexed retrieval.
It has the big O notation O(n). It has the big O notation O(log n).
Like this post? Share it with others
If you like this article, please leave a comment or subscribe this blog via RSS or via e-mail, Bookmark and share through your network. Click the AddThis button below. Thanks.
  • Share/Bookmark

How to move a file from one location to another location?

September 1st, 2009

The steps to move a file from one location to another location are as follows:

  1. Implement the System.IO namespace as follows.

    using System.IO;
  2. Enter the source path of the file that is to be moved and the destination path where the file is to be moved.

    string source=@” d: emp est.txt “;
    string destination=@” d:Myapp emp1 est.txt “;
  3. Check whether the source file exists. If it does not exist, create it.

    If(!File.Exists(source)
    {
    //This block is executed only when source file does not exist
       FileStream fs=File.Create(source);
    }
  4. Ensure that the target does not exist.

    If(File.Exists(destination)
    File.Delete(destination);
  5. Move the file.

    File.Move(source, destination);
  6. Close the FileStream class, if used.

    fs.Close();
Like this post? Share it with others
If you like this article, please leave a comment or subscribe this blog via RSS or via e-mail, Bookmark and share through your network. Click the AddThis button below. Thanks.
  • Share/Bookmark

How to use the UTF8Encoding class to encode and decode a text?

September 1st, 2009

The steps to use the UTF8Encoding class to encode and decode a text data are as follows:

  1. Implement the following namespace:

    using System.Text;

  2. Create a UTF8Encoding class object as follows:

    UTF8Encoding utf8 = new UTF8Encoding();

  3. Create a string object to store input text as follows:

    String unicodeString =”This unicode string contains two characters with codes outside an 8-bit code range,Pi (u03a0) and Sigma (u03a3)”;

  4. Encode the given text in the following manner:

    Byte[] encodedText = utf8.GetBytes(unicodeString);

  5. Display the encoded text as follows:

    foreach (Byte bt in encodedText)
    Console.Write(“[{0}]“, bt);

  6. Decode the encoded text as follows:

    String decodeStr = utf8.GetString(encodedText);

  7. Display the decoded text as follows:

    Console.WriteLine(decodedStr);

Like this post? Share it with others
If you like this article, please leave a comment or subscribe this blog via RSS or via e-mail, Bookmark and share through your network. Click the AddThis button below. Thanks.
  • Share/Bookmark

What is a runtime host?

August 31st, 2009

A runtime host manages the execution of application code and provides various services to the application. The Common Language Runtime (CLR) has been designed by Microsoft to support different types of applications such as Windows applications, Web applications, Mobile applications, etc. Each of these applications requires a runtime host to start its application. The .NET Framework provides different types of runtime hosts for different types of applications. Following are examples of some runtime hosts:

  • ASP.NET
  • Shell Executables
  • Microsoft Internet Explorer
Like this post? Share it with others
If you like this article, please leave a comment or subscribe this blog via RSS or via e-mail, Bookmark and share through your network. Click the AddThis button below. Thanks.
  • Share/Bookmark

What is an isolated storage?

August 25th, 2009

An isolated storage is a data storage mechanism that provides isolation and safety to data that is directly associated with application code by standardized method definitions. Many tools can be designed for manipulating isolated storage in order to configure file storage space, set security policies, and delete unused data. Applications that access isolated storage do not need to specify any safe location for data in the file system. An isolated storage is used to store data that is controlled by the security policy of a computer.

Like this post? Share it with others
If you like this article, please leave a comment or subscribe this blog via RSS or via e-mail, Bookmark and share through your network. Click the AddThis button below. Thanks.
  • Share/Bookmark

What are the situations in which an isolated storage is useful for storing data?

August 24th, 2009

An isolated storage is useful for storing data in the following situations:

  • Managed code controls that are downloaded from the Internet can use isolated storage for storing users’ settings and application states. These controls cannot write data to a hard drive through normal I/O classes.
  • Web applications can use isolated storage files for storing data, as they are not allowed to use I/O classes.
  • Shared components can use isolated storage for providing controlled access to data stores. These components are shared among multiple applications.
  • Server applications can use isolated storage files for providing individual stores for users to make request to the applications. A server must impersonate a user to make a request, as an isolated storage is always isolated by a user.
  • Applications that maintain a user profile can also use isolated storage files. In such cases, a user’s isolated stores can move about with the user profile.
Like this post? Share it with others
If you like this article, please leave a comment or subscribe this blog via RSS or via e-mail, Bookmark and share through your network. Click the AddThis button below. Thanks.
  • Share/Bookmark

What kind of data should not use an isolated storage for storing purpose?

August 24th, 2009

Confidential information such as unencrypted keys or passwords, and application code should not use isolated storage files for storing purpose, because isolated storage is not secured by highly trusted code, unmanaged code, or trusted users. Configuration and deployment settings should also not use an isolated storage, as these settings are controlled by administrators.

Like this post? Share it with others
If you like this article, please leave a comment or subscribe this blog via RSS or via e-mail, Bookmark and share through your network. Click the AddThis button below. Thanks.
  • Share/Bookmark
uCertify.com | Our Company | Articles | Contact Us | News and Press Release | uCertify India | Entries (RSS)
MCSE: MCSA, MCTS, MCITP    JAVA Certification: SCJP, SCWCD    Cisco Certification: CCNA, CCENT    A+, Network+, Security+ Project+
Oracle Certification: OCP 11g, OCP 10g, OCA 11g, OCA 10g    CIW foundation    EC-212-32,    CISSP    Photoshop ACE CS4    Adobe Flash ACE, PMP, CAPM
© 2008 uCertify.com. All rights reserved. All trademarks are the property of their respective owners.