Check If IEnumerable<> or List<> Type is Empty / Null

There are three ways to check whether IEnumerable<> or List<> type is empty / null or not. == NULL .Any() .Count() In any case, you always want to combine “== null” and, either “.Any()” or “.Count()”, with OR (“||”) operator. In addition, you want to put “== null” before the other condition. The reason for this is, “if” condition goes from left to right. So, if the list object is null, it will not go to the second check,…

Read More

How to search in Outlook

Outlook provides you with a number of built-in search filters. To use the built-in filters, click in the Search box. Based on your preference, you can use Advanced Search by clicking the filter button on the right side of the search box. Alternatively, the Outlook ribbon will change to show the Search tab and you use any of the options in the Refine group to refine your search results. You can find the search box at the top of…

Read More

Visual C# Code Snippets

By default the following code snippets are included in Visual Studio. Name (or shortcut) Description Valid locations to insert snippet #if Creates a #if directive and a #endif directive. Anywhere. #region Creates a #region directive and a #endregion directive. Anywhere. ~ Creates a destructor for the containing class. Inside a class. attribute Creates a declaration for a class that derives from Attribute. Inside a namespace (including the global namespace), a class, or a struct. checked Creates a checked block. Inside a method, an indexer, a property accessor, or an event…

Read More

15 Excel Tips on Improving Productivity Using Excel

To format a number as SSN, use the custom format code “000-00-0000?… To format a phone number, use the custom format code “000-000-0000?… To show values after decimal point only when number is less than one, use _($#,##0.00_);_($#,##0_) as formatting code… To remove grid lines from excel worksheet, go to menu > tools > options > and un-check grid lines option. (Excel 2007: office button > excel option > advanced)… To hide a worksheet, go to menu > format…

Read More

20 Tips in How to Solve Common problems using Excel Formulas

To get the first name of a person, use =left(name,find(” “,name)-1) To calculate mortgage payments, use =PMT(interest-rate,number-of-payments,how-much-loan) To get nth largest number in a range, use =large(range,n)… To get nth smallest number in a range, use = small(range,n)… To generate a random phone number, use =randbetween(1000000000,9999999999), needs analysis toolpak if you are using excel 2003 or earlier… To count number of words in a cell, use =len(trim(text))-len(SUBSTITUTE(trim(text),” “,””))… To count positive values in a range, use =countif(range,”>0?)… To calculate…

Read More

25 Very Useful Keyboard Shortcuts for Excel

1. To format any selected object, press ctrl+1 2. To insert current date, press ctrl+; 3. To insert current time, press ctrl+shift+; 4. To repeat last action, press F4 5. To edit a cell comment, press shift + F2 6. To autosum selected cells, press alt + = 7. To see the suggest drop-down in a cell, press alt + down arrow 8. To enter multiple lines in a cell, press alt+enter 9. To insert a new sheet, press…

Read More

Visual Studio 2015 keyboard shortcuts – The complete list

Analyze Navigate Backward Shift+Alt+3 Navigate Forward Shift+Alt+4 Architecture New Code Map Ctrl+\, Ctrl+O New UMLor Layer Diagram Ctrl+\, Ctrl+N Architecture Context Menus Add Node Ins Both Dependencies B Incoming Dependencies I Outgoing Dependencies O New Comment Ctrl+Shift+K Ctrl+E, C Remove Del Rename F2 Build Build Solution Ctrl+Shift+B Cancel Ctrl+Break Compile Ctrl+F7 Run Code Analysison Solution Alt+F11 Class Diagram Collapse Num – Expand Num + Class View Context Menus Properties Alt+Enter Misc Commit All Edits Shift+Alt+U Move Left Edgetotheleft Ctrl+Shift+,…

Read More