Single | or & Vs Double || or &&
S.No | Single | or & | Double || or && |
1 | Bitwise Comparison. | Logical Comparison. |
-->
Share Dissimilarities in the Microsoft Technology(Visual Studio)
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. |