Win Press windows key to open start menu
Win+R Apply to open Run dialog box
Win+M Apply to minimize all opened windows
Win+Shift+M Apply to maximize all opened windows
Win+L Press keys to lock keyboard in windows XP
Win+E Press keys to open My Computer
Win+F Apply to open search options
Win+U Apply keys to open Utility Manager
Win+D To view desktop/minimize all windows
Win+F1 To view the detail windows help page
Win+Pause To view the System Properties dialog box
Win+Tab Move through taskbar programs
Win+F+Ctrl Apply to open search for computers
Alt+Tab Move through opened windows programs
Alt+F4 Press keys to close active windows program
Alt+Enter Apply to open properties of selected item
Alt+ SPACEBAR Open the system menu of active window
Alt+ SPACEBAR +N Press keys to minimize the active program
Alt+ SPACEBAR +R Press keys to restore the active program
Alt+ SPACEBAR+C Press keys to close the active program
Alt+ SPACEBAR+X Press keys to maximize the active program
Alt+ SPACEBAR+M Press keys to move the active program
Ctrl+Alt+Delete Apply to open windows task manager
Ctrl+Shift+Esc Apply to open windows task manager
Ctrl+Esc Press keys to open start menu
Shift Shift key to prevent CD from automatically playing
Shift+Delete To delete items permanently
Friday, September 30, 2011
Thursday, September 22, 2011
Windows Run Commands
Application to Open | Run Command |
---|---|
Accessibility Controls | access.cpl |
Accessibility Wizard | accwiz |
Add Hardware Wizard | hdwwiz.cpl |
Add/Remove Programs | appwiz.cpl |
Administrative Tools | control admintools |
Adobe Acrobat (if installed) | acrobat |
Adobe Designer (if installed) | formdesigner |
Adobe Distiller (if installed) | acrodist |
Adobe ImageReady (if installed) | imageready |
Adobe Photoshop (if installed) | photoshop |
Automatic Updates | wuaucpl.cpl |
Bluetooth Transfer Wizard | fsquirt |
Calculator | calc |
Certificate Manager | certmgr.msc |
Character Map | charmap |
Check Disk Utility | chkdsk |
Clipboard Viewer | clipbrd |
Command Prompt | cmd |
Component Services | dcomcnfg |
Computer Management | compmgmt.msc |
Control Panel | control |
Date and Time Properties | timedate.cpl |
DDE Shares | ddeshare |
Device Manager | devmgmt.msc |
Direct X Control Panel (if installed)* | directx.cpl |
Direct X Troubleshooter | dxdiag |
Disk Cleanup Utility | cleanmgr |
Disk Defragment | dfrg.msc |
Disk Management | diskmgmt.msc |
Disk Partition Manager | diskpart |
Display Properties | control desktop |
Display Properties | desk.cpl |
Display Properties (w/Appearance Tab Preselected) | control color |
Dr. Watson System Troubleshooting Utility | drwtsn32 |
Driver Verifier Utility | verifier |
Event Viewer | eventvwr.msc |
Files and Settings Transfer Tool | migwiz |
File Signature Verification Tool | sigverif |
Findfast | findfast.cpl |
Firefox (if installed) | firefox |
Folders Properties | folders |
Fonts | control fonts |
Fonts Folder | fonts |
Free Cell Card Game | freecell |
Game Controllers | joy.cpl |
Group Policy Editor (XP Prof) | gpedit.msc |
Hearts Card Game | mshearts |
Help and Support | helpctr |
HyperTerminal | hypertrm |
Iexpress Wizard | iexpress |
Indexing Service | ciadv.msc |
Internet Connection Wizard | icwconn1 |
Internet Explorer | iexplore |
Internet Properties | inetcpl.cpl |
Internet Setup Wizard | inetwiz |
IP Configuration (Display Connection Configuration) | ipconfig /all |
IP Configuration (Display DNS Cache Contents) | ipconfig /displaydns |
IP Configuration (Delete DNS Cache Contents) | ipconfig /flushdns |
IP Configuration (Release All Connections) | ipconfig /release |
IP Configuration (Renew All Connections) | ipconfig /renew |
IP Configuration (Refreshes DHCP & Re-Registers DNS) | ipconfig /registerdns |
IP Configuration (Display DHCP Class ID) | ipconfig /showclassid |
IP Configuration (Modifies DHCP Class ID) | ipconfig /setclassid |
Java Control Panel (if installed) | jpicpl32.cpl |
Java Control Panel (if installed) | javaws |
Keyboard Properties | control keyboard |
Local Security Settings | secpol.msc |
Local Users and Groups | lusrmgr.msc |
Logs You Out Of Windows | logoff |
Malicious Software Removal Tool | mrt |
Microsoft Access (if installed) | msaccess |
Microsoft Chat | winchat |
Microsoft Excel (if installed) | excel |
Microsoft Frontpage (if installed) | frontpg |
Microsoft Movie Maker | moviemk |
Microsoft Paint | mspaint |
Microsoft Powerpoint (if installed) | powerpnt |
Microsoft Word (if installed) | winword |
Microsoft Syncronization Tool | mobsync |
Minesweeper Game | winmine |
Mouse Properties | control mouse |
Mouse Properties | main.cpl |
Nero (if installed) | nero |
Netmeeting | conf |
Network Connections | control netconnections |
Network Connections | ncpa.cpl |
Network Setup Wizard | netsetup.cpl |
Notepad | notepad |
Nview Desktop Manager (if installed) | nvtuicpl.cpl |
Object Packager | packager |
ODBC Data Source Administrator | odbccp32.cpl |
On Screen Keyboard | osk |
Opens AC3 Filter (if installed) | ac3filter.cpl |
Outlook Express | msimn |
Paint | pbrush |
Password Properties | password.cpl |
Performance Monitor | perfmon.msc |
Performance Monitor | perfmon |
Phone and Modem Options | telephon.cpl |
Phone Dialer | dialer |
Pinball Game | pinball |
Power Configuration | powercfg.cpl |
Printers and Faxes | control printers |
Printers Folder | printers |
Private Character Editor | eudcedit |
Quicktime (If Installed) | QuickTime.cpl |
Quicktime Player (if installed) | quicktimeplayer |
Real Player (if installed) | realplay |
Regional Settings | intl.cpl |
Registry Editor | regedit |
Registry Editor | regedit32 |
Remote Access Phonebook | rasphone |
Remote Desktop | mstsc |
Removable Storage | ntmsmgr.msc |
Removable Storage Operator Requests | ntmsoprq.msc |
Resultant Set of Policy (XP Prof) | rsop.msc |
Scanners and Cameras | sticpl.cpl |
Scheduled Tasks | control schedtasks |
Security Center | wscui.cpl |
Services | services.msc |
Shared Folders | fsmgmt.msc |
Shuts Down Windows | shutdown |
Sounds and Audio | mmsys.cpl |
Spider Solitare Card Game | spider |
SQL Client Configuration | cliconfg |
System Configuration Editor | sysedit |
System Configuration Utility | msconfig |
System File Checker Utility (Scan Immediately) | sfc /scannow |
System File Checker Utility (Scan Once At The Next Boot) | sfc /scanonce |
System File Checker Utility (Scan On Every Boot) | sfc /scanboot |
System File Checker Utility (Return Scan Setting To Default) | sfc /revert |
System File Checker Utility (Purge File Cache) | sfc /purgecache |
System File Checker Utility (Sets Cache Size to size x) | sfc /cachesize=x |
System Information | msinfo32 |
System Properties | sysdm.cpl |
Task Manager | taskmgr |
TCP Tester | tcptest |
Telnet Client | telnet |
Tweak UI (if installed) | tweakui |
User Account Management | nusrmgr.cpl |
Utility Manager | utilman |
Windows Address Book | wab |
Windows Address Book Import Utility | wabmig |
Windows Backup Utility (if installed) | ntbackup |
Windows Explorer | explorer |
Windows Firewall | firewall.cpl |
Windows Magnifier | magnify |
Windows Management Infrastructure | wmimgmt.msc |
Windows Media Player | wmplayer |
Windows Messenger | msmsgs |
Windows Picture Import Wizard (need camera connected) | wiaacmgr |
Windows System Security Tool | syskey |
Windows Update Launches | wupdmgr |
Windows Version (to show which version of windows) | winver |
Windows XP Tour Wizard | tourstart |
Wordpad | write |
Thursday, September 8, 2011
Monday, September 5, 2011
Sunday, September 4, 2011
Auto-Implemented Properties in C# 3.0
This is one of the productive changes in C# 3.0 which makes your code more readable without writing more lines for implementing properties. In C# 2.0, we implement properties with get and set accessors for returning (get) a private member’s value and for setting (set) a private members value, like as follows:
class Customer
{
private string customerID;
public string CustomerID
{
get { return customerID; }
set { customerID = value; }
}
private string contactName;
public string ContactName
{
get { return contactName; }
set { contactName = value; }
}
private string city;
public string City
{
get { return city; }
set { city = value; }
}
}
So, in the above code you have declared three properties, every time doing the same thing i.e. returning and setting a private members value, which reduces the readability of the code.
But in C# 3.0 the same pattern can be implemented in a better way like follows:
class Customer
{
public string CustomerID { get; set; }
public string ContactName { get; set; }
public string City { get; set; }
}
For the above given code C# Compiler will automatically generate backing fields.
But there is a limitation i.e. when we use this kind of syntax for implementing properties we have to implement both get and set accessors.
Whereas we can use modifiers today also with Auto implemented properties i.e. you can have properties as follows:
public string CustomerID { get; private set; }
Anonymous Types in C# 3.0
C# 2.0 gave us Anonymous methods which are declared inline and had no formal name, in the same way C# 3.0 gives Anonymous Types which are created with the help of combining ‘var’ (Local Variable Type Inference) and Object Initializers as follows:
var cust = new { CustID = 101, CustName = "Manish" };
For the above given code, C# compiler automatically generates a name. Each member of the type i.e. CustID and CustName are the properties taken from the syntax of Object Initializer.
Collection Initializers in C# 3.0
With C# 3.0, Collection Initializer is the combination of Collection Classes and Object Initializers. This feature is available for all the objects which are enumerable (i.e. they implement IEnumerable<T>) and have a public ‘Add’ Method to add the value.
class CEmployee
{
private int EmpID;
public int EID
{
get { return EmpID; }
set { EmpID = value; }
}
private string EmpName;
public string ENAME
{
get { return EmpName; }
set { EmpName = value; }
}
}
Using the above given class, if you want to create a List of Employees, then in C# 2.0 the code will be:
List<CEmployee> Employees = new List<CEmployee>();
CEmployee e1 = new CEmployee(101, "Rohit Sharma");
// If you have implemented Constructor
Employees.Add(e1);
And, if there is no Constructor, then:
List<CEmployee> Employees = new List<CEmployee>();
CEmployee e1 = new CEmployee();
e1.EID = 1;
e1.ENAME = "Ramesh Sachin";
Employees.Add(e1);
This is for 1 Employee, now if you want to add 5 Employees, then you have to create them separately and add them in the list one by one.
But in C# 3.0, it is made easier, like below:
List<CEmployee> Employees = new List<CEmployee>()
{
new CEmployee() { EID = 101, ENAME = "Goutham" },
new CEmployee() { EID = 102, ENAME = "Virat" },
new CEmployee() { EID = 103, ENAME = "Raina" },
new CEmployee() { EID = 104, ENAME = "Isanth" },
new CEmployee() { EID = 105, ENAME = "Mahendar" }
};
Object Initializers in C# 3.0
Object Initializers
This change in C# 3.0 allows developers to get rid of the constructors they have to write in case of C# 2.0. Say for example in C# 2.0 if you have a class named CEmployee as follows:
class CEmployee
{
private int EmpID;
public int EID
{
get { return EmpID; }
set { EmpID = value; }
}
private string EmpName;
public string ENAME
{
get { return EmpName; }
set { EmpName = value; }
}
}
Now, if you want to initialize the objects at the time of declaration, as follows:
CEmployee obj1 = new CEmployee(101, "Rohit Sharma");
CEmployee obj2 = new CEmployee(102);
CEmployee obj3 = new CEmployee("Rahul");
To write the code shown in the lines above, the developer should write three parameterized constructors inside the CEmployee class as follows:
public CEmployee(int id, string name)
{
EmpID = id;
EmpName = name;
}
public CEmployee(int id)
{
EmpID = id;
}
public CEmployee(string name)
{
EmpName = name;
}
However in C# 3.0, if you have created properties inside your class as in above given CEmployee class, you do not have to write the constructors anymore. So C# 3.0 gives you this enhancement to write it easily as follows:
CEmployee obj1 = new CEmployee() { EID = 102, ENAME = "Rahul" };
CEmployee obj2 = new CEmployee() { EID = 103 };
CEmployee obj3 = new CEmployee() { ENAME = "Vijay Kumar" };
The above given lines of code are easier to read in respect with C# 2.0 code, but you have to write a bit more code.
New Features of C# 3.0
The changes made in C# 3.0 are as follows:
- Local Variable Type Inference or Implicitly Typed Local Variables.
- Object Initializers
- Collection Initializers
- Anonymous types
- Auto-implemented properties
- Extension methods
- Lambda expressions
- Query expressions
- Expression trees
- Partial Methods
Local Variable Type Inference
var data = 1;
data = 23.4f; //Compile time Error
Interestingly ‘var’ can be used in any of the following ways:
Directly associating a value or type:
var data1 = 10; // data1 is of type System.Int32
var data2 = 20.5f; // data2 is of type System.Single
var data3 = "Hello"; // data3 is of type System.String
var data4 = new List<int>(); // data4 is of type Generic List<T>
var data5 = new CEmployee(); // data5 is an instance of Class CEmployee
Associating with expressions:
var data6 = 23 + 45; // data6 is of type System.Int32
Association with methods:
In C# 2.0, if you want to call a method ( GetData( ) ) which returns you an integer, you will write something like this:
int data = GetData();
and if GetData() returns you a string, the above written line will throw an error, but now with ‘var’ you can write the same code as follows:
var data = GetData();
Now even if your GetData() method returns you any type, the above written line need not be changed.
There are some rules associated with ‘var’, which are as follows:
1. You must initialize ‘var’ type variables with some value or expression.
2. Once the type is assigned to ‘var’ type variable you cannot change the type of value the variable holds.
3. ‘var’ cannot be used as a return type of the methods.
var Add(int x,int y); //Error
4. ‘var’ cannot be used in argument list of the methods.
int Add(var x,var y); //Error
5. The contextual keyword 'var' can only appear within a local variable declaration i.e. ‘var’ types can be created only inside a method or a block.
Saturday, September 3, 2011
Subscribe to:
Posts (Atom)