Single | or & Vs Double || or &&
S.No | Single | or & | Double || or && |
1 | Bitwise Comparison. | Logical Comparison. |
-->
S.No | Single | or & | Double || or && |
1 | Bitwise Comparison. | Logical Comparison. |
S.No | Fix | Int |
1 | Fix returns the first negative integer greater than or equal to Provided number. | Int return the first negative integer less than or equal to Provided number. |
S.No | Function | Sub |
1 | Return Values. | Does Not Return Values. |
S.No | Mid Function | Mid Statement |
1 | Returns the Character. | Replace the Character. |
S.No | Private Assembly | Public Assembly |
1 | Private assembly can be used by only one application. | Public assembly can be used by multiple applications. |
2 | Private assembly will be stored in the specific application's directory or sub-directory. | Public assembly is stored in GAC (Global Assembly Cache). |
3 | There is no other name for private assembly. | Public assembly is also termed as shared assembly. |
4 | Strong name is not required for private assembly. | Strong name has to be created for public assembly. |
5 | Private assembly doesn't have any version constraint. | Public assembly should strictly enforce version constraint. |
S.No | System exceptions | Application exceptions |
1 | common exceptions thrown by the CLR of .Net Framework. | user defined exceptions thrown by the application. |
S.No | First | FirstOrDefault |
1 | Gives first record from the collection, if collection doesn't have any object then throws error. | FirstOrDefault extension method is used to retrieve the first element from the collection, if not then gives null |
S.No | LINQ To SQL | LINQ To Object |
1 | needs a Data Context object. | doesn’t need any intermediate LINQ provider or API. |
2 | returns data of type IQueryable | returns data of type IEnumerable |
3 | translated to SQL by way of Expression Trees, which allow them to be evaluated as a single unit and translated to the appropriate and optimal SQL statements | does not need to be translated. |
4 | translated to SQL calls and executed on the specified database. | executed in the local machine memory. |
S.No | Last | LastOrDefaulf |
1 | Last extension method gives last element from the collection. If there is no element in the collection, it throws error. | LastOrDefault extension method gives the last element form the collection, if not gives null. |
S.No | Constants | Read-only |
1 | Constants are dealt with at compile-time. | Read-only variables are evaluated at runtime. |
2 | Constants supports value-type variables. | Read-only variables can hold reference type variables. |
3 | Constants should be used when it is very unlikely that the value will ever change. | Read-only variables should be used when run-time calculation is required. |
S.No | Particulars | Double.Parse | ConvertTo.Double |
1 | thrown error | thrown error. | Doen not thrown error,Return O Value. |
S.No | Particulars | Int.Parse | Convert.ToInt32 |
1 | thrown error | thrown error. | Doen not thrown error,Return O Value. |
S.No | Particulars | Local Temp Table | Global Temp Table |
1 | Available | SQL Server session or connection (means single user). | all SQL Server sessions or connections (means all the user). |
2 | Deleted | These are automatically deleted when the session that created the tables has been closed. | These can be created by any SQL Server connection user and these are automatically deleted when all the SQL Server connections have been closed. |
3 | Stared with sign | Local temporary table name is stared with single hash ("#") sign. | Global temporary table name is stared with double hash ("##") sign. |
S.No | Particulars | ComboBox | ListBox |
1 | Select | One Data. | Multiple Data. |
2 | Facility | Drop Down Facility. | Drop up and Drop Down Facility. |
3 | Check Box | can't Use CheckBox. | Can use Check Box. |
S.No | Particulars | Dynamic | Anonymous types |
1 | Run time | Dynamic types work at run time by late binding of object properties. | Anonymous types cause the compile time errors. |
2 | Keyword | Dynamic Keyword | Var Keyword. |
S.No | LINQ | DLINQ | XLINQ |
1 | programming model that introduces queries as a first-class concept into any Microsoft .NET language. | an extension to Linq that allows querying a database and do object-relational mapping. | an extension to Linq that allows querying XML documents, as well as creating or transforming XML. |
S.No | Particulars | WindowsDefaultLocation | WindowsDefaultBounds |
1 | size | tells the form to start up at a location selected by OS, but with internally specified size. | delegates both size and starting position choices to the OS. |
S.No | Particulars | Store Procedure | Function |
1 | Return | No return value. | Must return Value. |
2 | Parameter | Input/Output. | Input. |
3 | Call | can't called to Function. | can called to Store Procedure. |
4 | Mandatory Input Paramenter | not Mandatory. | Mandatory. |
5 | DML/Select | Allow DML/Select. | Allow Select. |
6 | Exception | can be handled. | can not be handled . |
S.No | Particulars | Primary Key | Unique Key |
1 | null value | can't accept null values. | can accept Only One null value. |
2 | key | only one Primary key in a table. | more than one Unique key in a table. |
S.No | Particulars | Primary Key | Foreign Key |
1 | null value | can't accept null values. | can accept Only One null value. |
2 | key | only one Primary key in a table. | more than one foreign key in a table. |
S.No | Particulars | IENUMERABLE | IQUERYABLE |
1 | Namespace | System.Collections | System.Linq |
2 | Suitable for | LINQ to Object and LINQ to XML. | LINQ to SQL. |
3 | custom query | doesn’t supports. | supports custom query using CreateQuery and Execute methods. |
4 | lazy loading | doesn’t supports. | supports. |
S.No | Particulars | ILIST | IENUMERABLE |
1 | Add/Remove Item | Support. | doesn't support. |
2 | Filtering | doesn't support. | Support. |
S.No | Particulars | Store Procedure | LINQ |
1 | Faster | Faster than LINQ. | Slower than Store Procedure. |
2 | Debug | Not Allowed. | Allowed. |
3 | writing complex queries | Best Way. | Not Possible. |
4 | Deploy | SQL script for deployment. | easy and simple. |