- Open visual studio developer command prompt.
- Start your service and make sure it is up and running.
- Copy the URL of service .
- In visual studio command prompt type ” svcutil [URL] /out:filename.cs /config:filename.config
What is the difference between Compile time Exception and Runtime Exception?
Creation of Symbol table, Syntax analysis, Semantic analysis, Code optimization, Code Generation & Error Handling.
Can abstract class be Sealed in C#?
An abstract class cannot be a sealed class because the sealed modifier prevents a class from being inherited and the abstract modifier requires a class to be inherited.
Best C# Practices to follow
- Always name things well.
- Make sure there is only one class per file.
- Always try to use properties instead of public variables.
- Write methods to make only one thing.
- Use public modifier only when necessary.
- Try to keep everything simple.
- Always be consistent.
- Use curly braces for if statement.
- Concatenate strings using “$”.
- Avoid global variables.(Make use of app.config file to declare global variables if needed).
How to revert a check in made in Team Foundation Server ?
Go to Team Explorer and in source control explorer select your project.
Right click and select view history.
In history click on the change set , you want to cancel.
Right click on the change set and select rollback entire change set.
What is a “Table”, “Record”, “Field” ?
A table is a collection of records of specific type.
Ex:Employee Table, Salary Table.
A record is a collection of values/specific entity.
Ex:Employee, Salary.
A field is an area within a record for a specific piece of data.
Ex:Employee Name, Employee Id.
What is a foreign key?
When a ‘one’ table’s primary key field is added to a related “many” table in order to create a common field which relates the two tables , it is called foreign key in the “many” table.
What is a primary key?
A primary key is a column whose values uniquely identify every row in a table. It should be unique and not null.
How to reset column identity in SQL server?
Sometimes we delete rows from a table and the identity will not start as expected from one, it would assign a random value. In order to reset the value we have to use the following command.
DBCC CHECKIDENT ('[TableName]', RESEED, 0);
GO
What is Lazy Loading?
Lazy loading loads data into cache only when necessary. Write through adds data or updates data in the cache whenever data is written to the database.Lazy loading allows for stale data ,but wont fail with empty nodes and may populate the cache with superfluous data, a problem referred to as “cache churn” .
Adding a time to live (TTL) value to each write allows us to enjoy the advantages of each strategy and avoid cluttering up the cache with superfluous data. Unrelated to these issues is consistent hashing, which is technique used to partition data keys between nodes in cluster.