Вы находитесь на странице: 1из 33

YOUVE GOT AN INTERVIEW!

Remember that for many part time or sales jobs, the interview or selection process can start from that first phone call, inviting you for interview. Employers will be checking how you sound on the phone are you polite, can you communicate properly? So make sure you answer your phone appropriately! If you do get a call when youre driving or in the middle of something, pull over and stop what youre doing. This means you can concentrate properly and wont sound distracted or vague not a good first impression. Make sure you get the following details: Time, day and place of the interview Contact name and phone number for the company Also it is perfectly fine to ask the following questions about the interview so that you have all the information you need. Dont be embarrassed to call back if you forget to ask during the initial call. This shows initiative and that youre taking the interview seriously. How many people will be interviewing me? Or, Who will be interviewing me? How long is it likely to last? Will there be any sort of test? What documents do I need to bring with me? What is your company website? (if you dont know this already useful to research the company) BEFORE THE INTERVIEW A CHECKLIST Find out everything you can about the company from annual reports / brochures / web pages etc. Review your CV and think through specific questions you may be asked about it, particularly in relation to the job. Practice answers to common interview questions (listed below). Prepare your own questions about the company and job. Double check that you have the correct day and time

Consider making a practice trip to the company so that you know where it is and how much time to allow. Also take into account what time of day your interview is and therefore what the traffic will be like! If for any reason, you decide later that you dont want to attend the interview LET THE COMPANY KNOW. It can be considered (by multi national companies in particular) extremely rude to simply not appear for an interview.. Also the Dubai business community is quite small and you never know when you might come across someone from that company again, and this time you might want the job! DRESS Work out what you are going to wear in advance so you can make sure its clean and ironed. For men a suit and tie or smart jacket and tie are essential. For women a trouser suit, smart trousers and blouse, or skirt and blouse are fine. Make sure your shoes are clean and polished, hair is neat and tidy. Avoid excessive jewellery, make up, perfumes, extremely bright colours and patterns. Always dress smarter even if your interviewer is in jeans and T shirt - you want to project a professional, businesslike image ON THE DAY Take the company name, address and contact details with you, together with directions on how to get there. You will need these and may have to call the company if you are delayed. Take a copy of your CV with you. Have a notebook, pen and your questions to hand. Arrive EARLY! If you are going to be late for some unavoidable reason (e.g. car accident) LET THEM KNOW! From the moment you come into view of the interview venue look organised and composed. Be polite to the receptionist! Some organizations will check on how candidates behave to other staff When you are greeted: If you are sitting down, for example in the reception area, stand up, hold any bags you may have in your left hand and greet the Interviewer with a smile and a firm handshake with the right hand. If you are unsure whether you should shake a ladys hand and you are a man, or vice versa, wait for the interviewer

to offer a handshake. BODY LANGUAGE Research shows that people form an impression of someone within the first four minutes of meeting them. 55% of the impression is formed by visual impact: dress, facial expression and body language, 38% by a persons tone of voice and 7% by what they actually say - so consider the following: Sit up straight, place your hands together in your lap if you tend to fiddle. Look attentive by leaning forward slightly Listen keenly, nod and orally acknowledge what you are told Answer the question and then stop. You can always ask, Would you like me to continue? It is up to the interviewer to ask you another question. Short silences are not always bad! Be prepared to support your answers with examples and evidence, facts and figures Maintain some eye contact with everyone present. Look at the person who asked you the question, but also glance at the others on the interview panel too. Dont smoke, or chew gum. If you offered something to eat or drink, remember it can be difficult to manage eating and drinking with talking when you are nervous. If it is acceptable, it is probably best to refuse, or take a small sip of drink to start with and then leave it. AT THE END OF THE INTERVIEW The interviewer should ask if you have any further questions. Check your list of questions. If any are outstanding ask them now. It is perfectly fine to have a short list of questions written out on a piece of paper. It shows you have prepared yourself and are taking the interview seriously. Or you can say, I did have some, but theyve been answered . As you leave: Tell the Interviewer that you are interested in the job and make sure you say goodbye to everyone in the room when you leave.

COMMON INTERVIEW QUESTIONS TO PREPARE FOR

Go through your responses before every interview as each application is unique. Practice in front of a mirror or with friends or family until you feel confident with any of these questions. Many of them are asking for the same information but the question is put in a different way. You may not be asked these questions, but being prepared to answer them will increase your confidence and you could be asked them at another interview in the future! These are the main areas of questioning: ABOUT YOU. You need to think about your strengths, what youre good at, what youve achieved in your last job/studies and what you want to achieve in the future. All your answers should be relevant to the job and include examples from your previous job or experiences. Make sure you have read and understood the job description and that you can explain how your skills fit the job. Tell us about yourself (this is asking for brief information about you that is relevant to the job! So you could include a bit about about your education and work experience as relevant to the job not your life history!) Why do you want the job?

(
highlight why youre interested in the job or the company and talk about the skills you have that make you suitable for the job) What can you offer? (again run through the skills you have that are relevant to the job) Why should we employ you? (as above) How would you describe yourself?

(
you could say well I think my friends might say I am. Again keep it to skills and characteristics that are relevant to the job What are your strengths? Again, another way of asking you to describe why youre suitable for the job What are your weaknesses? You need to choose something that is in fact positive or a strength e.g.: When I first started university I struggled with managing my social life and my studies, but Ive learnt to balance the two and have passed all my exams and always get my assignments in on time

Describe a difficult situation at work and how you handled it (give an example from your own experience do not criticize other people or colleagues in the process) What are the characteristics of a good team?(cooperation, listening to each other, appreciation of different skills people can bring to the team) Can you act on your own initiative? (give examples of independent work, ideas to improve things and how successfully you implemented those ideas these could be from your job, your studies or your community)) Describe an achievement or contribution you made in your last job (this can be very simple, such as reorganizing or introducing a new filing system but it shows creativity and initiative) What has been your greatest success? How did you achieve it? (choose something fairly recent could be sporting , could be dealing successfully with a difficult assignment the interviewer is usually more interested in your approach to achieving the success rather than the actual success) Can you work under pressure?

Give an example, e.g.: combining completing assignments with taking exams How long will you stay in the new job?

(
Obviously Id like to stay as long as possible so that I can continue learning and developing and contribute to the company. I certainly dont see this opportunity as short term one, or a stepping stone

)
Companies want to know that you will leave at the first sign of a better job offer or higher salary. If you give any indication that you might do this, you will not be hired. Where do you want to be in 2, or 5 or 10 years time? Dont be tempted in to making over ambitious claims e.g. I want to be Managing Director, or I want to run my own

business. No one can realistically predict what sort of job theyll be doing in five years time. People are already doing jobs that didnt exist 10 years ago Unless you are in a profession with a clear career path, e.g. medicine, or law, armed forces etc, concentrate on answering this question in by describing the sort of situation youd like to be in and this is an opportunity to demonstrate your willingness to learn and develop and cope with change. "Making a more significant contribution to whatever organisation I'm working for. To have developed new skills, abilities, and maturity. To have become better qualified in whatever way suits the situation and opportunities I have.." "I'd like more responsibility, because that's generally comes as a result of experience learning and personal growth, and it's important for my own satisfaction." "Long term I want to make the most of my abilities and build a serious career, but in this day and age nothing is guaranteed; I'll do my best and believe that opportunities will arise which will allow me to keep contributing, and developing my abilities in a way that benefits both any company Im working for, and me." Adapted from: www.business balls.com/interviews Why did you leave your last job? If the company closed down, refused to pay employees wages, you had to move because of family circumstances, say so. Although with family circumstances emphasise that you are now settled and that are not intending to move away. Companies want to know that you will leave at the first sign of a better job offer or higher salary. If you give any indication that you might do this, you will not be hired. Avoid criticizing the company for closing down, not paying wages etc. just state the facts and dont go into details. I was made redundant from my last position due to company restructuring. The company was cutting back and, unfortunately, my job was one of those eliminated. The company was unable to pay employees wages for several weeks /months and I need to have a regular salary coming in. I'm relocating to this area due to family circumstances. I recently received my degree and I want to use my educational background in my next position.

I'm ready to move on to a new challenge. I'm looking for a bigger challenge and to grow my career and I couldn'tjob hunt part time while working. It didn'tseem ethical to use my former employer's time. I am interested in a new challenge and an opportunity to use my technical skills and experience in a different capacity than I have in the past. After several years in my last position, I'm looking for a company where I can contribute and grow in a team-oriented environment. I am interested in a job with more responsibility, and I am very ready for a new challenge. This position seemed like an excellent match for my skills and experience and I am not able to fully use them in my present job. ABOUT THE COMPANY. You MUST inform yourself about the company and their business before the interview. Look at their website! What do you know about this company? Why do you want to work for this company? What interests you about particular products or services? What can the company offer that your previous company cannot? ABOUT THE JOB YOU ARE APPLYING FOR. It is VERY common for interviewers to present you with a scenario: Describe how you would launch xxx product on the market Explain how you would solve xxx problem with xx software/hardware/network Describe what strategies you use to organize your work Describe how competent you are with MS Office or other packages Describe how you have used xxx software in your previous job.

Give an example of your commitment to customer service/what do you understand by good customer service? For sales jobs, you could be asked to sell something to the interviewer the mobile phone, or calculator on the desk. QUESTIONS YOU MAY WANT TO ASK: (make sure they are not already addressed on the companys website) What sort of roles have previous trainees progressed into? What sort of staff training or development programme does the company have? What training do you provide? Where will I fit into the overall company structure? Who will I report to? How will you measure my performance? What are the chances of advancement/promotion in this position? When will you decide on the appointment? What is the next step after this interview?

MONEY CURRENT SALARY, FUTURE SALARY AND CONDITIONS.


Ideally you should start negotiating money ONCE youve been offered the job. You are then in a much stronger negotiating position. However, employers in Dubai will generally push you to name a figure very early on in the interview so be prepared for this question! 1. Do some research to find out what the market rate is for similar positions. Look on recruitment agency websites, in the job adverts in Gulf News and Khaleej Times to get an idea and as always, in Dubai, ask around classmates, colleagues, friends etc. 2. Decide what is the lowest acceptable figure for you, and then give a range: e.g. between 4000 and 6000 AED or around 6000 AED. Weigh up the salary against other benefits of the job e.g. experience you would gain, potential for growth in that particular job with a particular company, and how it will enhance your future earning capacity. If you are asked how much you want, try the following responses:

Quote the salary figure or range that you have decided is acceptable for you (after doing your research!) and you could then add that you would like to be able to negotiate the figure. Quote the salary figure given in the job advert if one is quoted and it is acceptable to you, otherwise name a range that isnt too ridiculously different from the figure in the job advert. Or you could say: Well, I would expect/ I believe a company such as yours generally pays the market rate for a new graduate / someone with my qualifications and experience I understand that your company pays good salaries, but I would rather start discussing pay if you were eventually to decide to offer me the job Do remember, this is not easy! So PREPARE AND PRACTISE your responses, and if necessary book a practice interview with a careers advisor. Questions about current salary: Be prepared for this question. Many people are concerned that if they are on a low salary and say so, the company will only offer them a similarly low salary. So do make sure you work out how you are going to answer this question and have a figure or range ready. You could also try the try the following responses. Like most people, Id like to be earning a little bit more than I am.or Im earning the market rate Do not ever sign a contract immediately you need some time to look over it, make sure you understand everything and ask any necessary questions or seek further advice.

FINALLY..FACTORS THAT CAN COST YOU THE JOB


BEING UNPREPARED FOR THE INTERVIEW BEING LATE COMPLAINING ABOUT PREVIOUS EMPLOYERS AND, OR COLLEAGUES BEING AGGRESSIVE OR OVER CONFIDENT AND ARROGANT MAKING EXCUSES LOOKING SCRUFFY AND UNTIDY LACKING ENTHUSIASM APPEARING GREEDY FOR MONEY OR PROMOTION, OR WANTING SHORTER WORKING HOURS.

Preparing For a Software Engineering Interview


by Niniane Wang, June 2006 You've used your killer resume to land an interview with a great company. Now how should you go about preparing? Of the 300+ software engineers I interviewed for Google (and previously Microsoft), some of them really shone, and others seemed ill-prepared. Many of the ill-prepared ones still got offers because they're obviously stars, but it's safer and less stressful to prepare yourself beforehand. Below are some tips that I've gathered over time: 1. Practice using the same medium (e.g. paper and pencil) and time limits (e.g. 30 minutes) as the real interview. Google and Microsoft both use whiteboard coding questions, yet often candidates practice by coding alone at home on a computer with a compiler. During the actual interview, they stand at the whiteboard and forget how to initialize an array, without their trusty syntax highlighter. Or they are so nervous having another person watch them that they panic and can't think straight. In real life, if you plan to swim the English Channel, would you limit your practice to laps at the local swimming pool? No, you would go test out the ocean waves, the salt water. Do the same here. Ask your recruiter the format of the interview and any coding questions. If the company gives the candidates an hour alone in a room with an editor and no compiler, practice that at home. If the company does whiteboard questions with an interviewer watching you, ask an engineer friend to be your mock interviewer. It's fine if the friend is a less experienced engineer than you -they'll still bring out your nervousness about making mistakes in front of others, so you can practice getting used to that. If you know me in real life and want me to do a mock interview for you, my going rate is dinner at Fuki Sushi if you're in industry, or at Pizza My Heart if you're a strapped-for-money student. 2. During the interview, don't obsess over little mistakes that happen. On more than one occasion, when I gave a star candidate a coding question, he zeroed in on the most optimally performant solution, identified the boundary cases, and began writing well-designed code. Midway through the problem, he makes a little error -- getting the order of operations wrong on the first try, or having an off-by-1 error, or forgetting to declare a variable.

When I point it out, the candidate responds with horror and then becomes so nervous that it impacts his performance during the rest of the interview. The fear is unfounded. An awesome candidate making a little error is like a concert violinist playing a challenging Brahms concerto and hitting two wrong notes. Sure, the audience could tell that he made mistakes, but they don't get confused as to whether he's actually at Twinkle-Twinkle-Little-Star level. Even if you completely bomb one question, many interviewers ask you multiple questions and will forgive a single mishap. Even bombing an entire interview is recoverable if the other interviews go well. Recently one of my coworkers (a tech lead for another project) interviewed a candidate and was very curt because he found the candidate's communication style irritating. The candidate proved himself during the interview, and the tech lead ended up being the strongest proponent for this candidate. He advocated harder for that candidate than he has for anyone else in a year. When things don't go well, just keep at it and don't give up hope. 3. Don't be rude to your interviewer. This should be obvious, but I have been surprised. One engineering candidate said to me, "Wow, I can't believe you're really my interviewer! You look so young!! I thought you were 18! Once you told me your credentials, I understand now, but at first I thought, 'This person is interviewing me?!?!'" That wasn't so smart. Other things that I recommend against saying:
o o

"Wow, you're really my interviewer? You look so old!" "Wow, you're really my interviewer? You look so fat!"

Another time, the candidate's cell phone rang 15 minutes into the interview. She let it go, and we were both distracted by it ringing for the next 20 seconds. 5 minutes later, it happened again. Another 5 minutes later, it rang for a third time. She finally reached for her purse and fumbled inside it for the phone. "It's about time", I thought, "she should've turned it off before coming in here." She dug the phone out of the purse and then proceeded to take the phone call right there in the middle of the interview. The only justification is if there is a family emergency, and in that case, warn your interviewer explicitly at the start of the interview. 4. Don't hijack the interview.

I've had a couple of candidates who came into the interview with the mindset that they MUST tell me all about their recent project Zoolander. I start the interview and they break in with, "I want to tell you about Zoolander. 10 years ago, this project started as a side feature..." and then go on for 5 minutes without taking a breath. Sometimes they decide that they must tell every interviewer about Zoolander, repeating the same description over and over during the day. Your interviewer has specific questions that they need to get through. If you hijack the interview, they may not have enough data from their own questions to be able to endorse your hiring. They may also think that you would be difficult to work with. If you really want to talk about a project, ask your interviewer, "I think project Zoolander really shows off my abilities. Can you or another interviewer fit in 10 minutes for me to explain it?" The interviewer can then refit their plan for the interview, instead of suddenly having their schedule be shanghaied. 5. When answering questions expecting a specific answer, give a high-level summary first. Sometimes I ask a question expecting a short answer, "How many people worked with you on project Zoolander?" The candidate then gives me an audiobook, "Well, there was Jimmy -- he did the UI and I had to mentor him quite a bit on it. Then there was Mary who ran the backend servers. She worked remotely from Pennsylvania. Two years later, we got another backend person David..." Three minutes later, the candidate is still talking, and I still don't know the answer of how many people worked on the project. Give an answer first, and then expound. "There were 3 when I joined, and 12 when I left. First there was Jimmy ..." Better yet, give the answer and offer to expound. "There were 3 when I joined, and 12 when I left. Would you like me to tell you what each one did?" 6. (Not as important) Wear something comfortable to your interview. Business casual is the most typical. People sometimes wonder how they should dress. The most important thing is that you feel comfortable. If you still want a recommendation, I say a buttondown shirt or even a T-shirt. A suit can come off as too formal in some companies (e.g. Google). This point is not as important, because people won't really care. You should ask your recruiter about what to wear, since this differs by country and East Coast / West Coast. A company like Google is more casual, so if you come in a three-piece suit, your interviewers may raise an eyebrow. If you've got the

goods in terms of engineering skills, it's not a dealbreaker though. One candidate came to an interview wearing a gothic mesh shirt with holes through which his nipples were clearly visible. He still got the job. (I don't recommend taking this risk.)

A final story
I'd like to leave you with a story of an unfortunate interview. Draw hope that no matter how your interview goes, you will likely be more lucky than this candidate. At Microsoft, we always offered drinks to our candidates, and one candidate "Jeff" took a pepsi. We got into my office, and he set it down on the desk. We started discussing his experiences and then launched into the whiteboard coding question, and he didn't get around to opening his pepsi. We stood at the whiteboard, and Jeff started to write a line of code. He stopped to think about the overall algorithm, and absentmindedly took a step back in order to see the entire whiteboard. In doing so, he inadvertently knocked against the desk, and the pepsi fell off the edge. This pepsi was still unopened. Thus, when it hit the ground, it exploded on impact. Pepsi sprayed in foamy gusts in all directions from the can. It was a slow-motion moment as beige spots of soda splashed onto my white walls, my bookshelf, my keyboard. We both stood there frozen, our hands halfway out (too slow to catch the pepsi), looking at the dripping liquid coating the entire inside of my office. We took a 5-minute break to get paper towels and mop up the mess. (Though my books always stuck together after that day, and my walls were never the same again.) We then returned to the whiteboard question. Jeff was nervous by this time (do you blame him?). He wrote some code, erased it, wrote more. He erased using his fingers against the board instead of using the eraser. Then sweat formed on his forehead, and he wiped it off using the same hand. By the end of the interview, his face was covered in streaks of red, green, and blue whiteboard marker. I said, "I think you have some marker on your hands. I'll show you the restroom." and let the bathroom mirror show him the problem.

Multiple - Language Development in .NET Framework


.NET Framework encourages cross-language development using multiple programming languages. To become a .NET language, any language should

have a compiler that translates the source code written in different languages into Microsoft Intermediate Language (MSIL). MSIL code is called as Managed Code. Managed code runs in .NET environment. In .Net framework the Common Runtime Language (CLR) contains a couple of just-in-time compilers (JIT) which can understand IL Code (managed Code), and can convert IL to native code (binary code targeted at a specific machine processor). Hence any language with IL Code generating compiler can become a .Net language

Explain the delegates in C#.


Delegates in C# are objects which points towards a function which matches its signature. Delegates are reference type used to encapsulate a method with a specific signature. Delegates are similar to function pointers in C++; however, delegates are type-safe and secure. Here are some features of delegates:

A delegate represents a class. A delegate is type-safe. We can use delegates both for static and instance methods We can combine multiple delegates into a single delegate. Delegates are often used in event-based programming, such as publish/subscribe.

We can use delegates in asynchronous-style programming. We can define delegates inside or outside of classes.

Syntax of using delegates //Declaring delegate delegate void SampleDelegate(string message); // declare method with same signature: static void SampleDelegateMethod(string message) { Console.WriteLine(message); } // create delegate object SampleDelegate d1 = SampleDelegateMethod;

// Invoke method with delegate d1("my program");

What is the purpose of connection pooling in ADO.NET?


Connection pooling enables an application to use a connection from a pool of connections that do not need to be re-established for each use. Once a connection has been created and placed in a connection pool, an application can reuse that connection without performing the complete connection creation process. By default, the connection pool is created when the first connection with a unique connection string connects to the database. The pool is populated with connections up to the minimum pool size. Additional connections can be added until the pool reaches the maximum pool size. When a user request a connection, it is returned from the pool rather than establishing new connection and, when a user releases a connection, it is returned to the pool rather than being released. But be sure than your connections use the same connection string each time. Here is the Syntax

conn.ConnectionString = "integrated Security=SSPI; SERVER=192.168.0.123; DATABASE=MY_DB; Min Pool Size=4;Max Pool Size=40;Connect Timeout=14;";

What is the difference between classes and structs in Microsoft.Net?


A struct is a value type, while a class is a reference type. When we instantiate a class, memory will be allocated on the heap. When struct gets initiated, it gets memory on the stack.

Classes can have explicit parameter less constructors. But structs cannot have this.

Classes support inheritance. But there is no inheritance for structs. A struct cannot inherit from another struct or class, and it cannot be the base of a class. Like classes, structures can implement interfaces.

We can assign null variable to class. But we cannot assign null to a struct variable, since structs are value type.

We can declare a destructor in class but can not in struct.

What is a Strong Name in Microsoft.Net?

In Microsoft.Net a strong name consists of the assembly's identity. The strong name guarantees the integrity of the assembly. Strong Name includes the name of the .net assembly, version number, culture identity, and a public key token. It is generated from an assembly file using the corresponding private key. Steps to create strong named assembly: To create a strong named assembly you need to have a key pair (public key and a private key) file. Use sn -k KeyFile.snk Open the dot net project to be complied as a strong named assembly. Open AssembyInfo.cs/ AssembyInfo.vb file. Add the following lines to AssemblyInfo file. [Assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyDelaySign(false)] [assembly: AssemblyKeyFile("..\\..\\KeyFile.snk")] Compile the application, we have created a strong named assembly.

What is the use of XSLT?


XSLT stands for Extensible Stylesheet Language Transformations. This language used in XSL style sheets to transform XML documents into other XML documents. XSLT is based on template rules which specify how XML documents should be processed. An XSLT processor reads both an XML document and an XSLT style sheet. Based on the instructions the processor finds in the XSLT style sheet, it produce a new XML document. With XSLT we can also produce HTML or XHTML from XML document. With XSLT we can add/remove elements and attributes, rearrange and sort elements, hide and display elements from the output file. Converting XML to HTML for display is probably the most common application of XSLT today.

Explain ACID properties of the database?


All Database systems which include transaction support implement ACID properties to ensure the integrity of the database. ACID stands for Atomicity, Consistency, Isolation and Durability

Atomicity: Each transaction is said to be atomic. If one part of the transaction fails, the entire transaction fails. Modifications on the data in the database either fail or succeed.

Consistency: This property ensures that only valid data will be written to the database. If, for some reason, a transaction is executed that

violates the databases consistency rules, the entire transaction will be rolled back and the database will be restored to a state consistent with those rules.

Isolation: It requires that multiple transactions occurring at the same time not impact each others execution.

Durability: It ensures that any transaction committed to the database will not be lost.

What is the basic functionality of Garbage Collector in Microsft.Net?


The Common Language Runtime (CLR) requires that you create objects in the managed heap, but you do not have to bother with cleaning up the memory once the object goes out of the scope or is no longer needed. The Microsoft .NET Framework Garbage Collector provides memory management capabilities for managed resources. The Garbage Collector frees objects that are not referenced and reclaims their memory. You should set your references to Nothing(null) as soon as you are done with them to ensure your objects are eligible for collection as soon as possible. Here are the list of some tasks performed by the Garbage collector:

Garbage collector reserves a piece of memory as the application starts for the managed heap.

Garbage collector controls the managed heap memory currently used and available to an application.

Garbage collector allocates memory for new objects within the application.

The Garbage Collector attempts to reclaim the memory of objects that are not referenced.

What is a static class?


We can declare a static class. We use static class when there is no data or behavior in the class that depends on object identity. A static class can have only static members. We can not create instances of a static class using the new keyword. .NET Framework common language runtime (CLR) loads Static classes automatically when the program or namespace containing the class is loaded.

Here are some more features of static class


Static classes only contain static members. Static classes can not be instantiated. They cannot contain Instance Constructors

Static classes are sealed.

Posted by Gurjinder Singh Brar 0 comments Labels: CLR, common language runtime, Static classes, static members

What is static member of class?


A static member belongs to the class rather than to the instances of the class. In C# data fields, member functions, properties and events can be declared static. When any instances of the class are created, they cannot be used to access the static member. To access a static class member, use the name of the class instead of an instance variable Static methods and Static properties can only access static fields and static events. Like: int i = Car.GetWheels; Here Car is class name and GetWheels is static property. Static members are often used to represent data or calculations that do not change in response to object state.

What is the purpose of Server.MapPath method in Asp.Net?


In Asp.Net Server.MapPath method maps the specified relative or virtual path to the corresponding physical path on the server. Server.MapPath takes a path as a parameter and returns the physical location on the hard drive. Syntax Suppose your Text files are located at D:\project\MyProject\Files\TextFiles If the root project directory is MyProject and the aspx file is located at root then to get the same path use code //Physical path of TextFiles string TextFilePath=Server.MapPath("Files/TextFiles");

What is the use of indexes and what are the types of indexes available in SQL Server?
Indexes are used to find data quickly when a query is processed in any relational database. Indexes improve performance by 10 to 500 times. Index can improve the performance in following operations:

Find the records matching with WHERE clause

UPDATE Books SET Availability = 1 WHERE SubjectId =12 DELETE FROM Books WHERE Price <10 SELECT * FROM Books WHERE Price BETWEEN 50 AND 80

Sorting the result with ORDER BY

SELECT * FROM Books ORDER BY Price DESC

Grouping records and aggregate values SELECT Count(*) as Units, Price FROM Books GROUP BY Price

There are two types of indexes available in SQL Server: clustered and nonclustered Clustered index Clustered index physically reorders the records of a table. Therefore a table can have only one clustered index. Usually a clustered index will be created on the primary key of a table. Non Clustered Index Non Clustered index are stored in the order of the index key values, but the information in the table is stored in a different order. Means logical sorting of data not Physical. In SQl Server 2005 a table can have 249 nonclustered indexes. Composite Indexes A composite index is an index on two or more columns. Both clustered and non-clustered indexes can be composite indexes. If you have composite index on Price and BookName then take can take advantage of it like this: SELECT BookName, Price FROM Products ORDER BY UnitPrice BookName, Price DESC

What is the difference between abstract class and interface?


We use abstract class and interface where two or more entities do same type of work but in different ways. Means the way of functioning is not clear while defining abstract class or interface. When functionality of each task is not clear then we define interface. If functionality of some task is clear to us but there exist some functions whose functionality differs object by object then we declare abstract class. We can not make instance of Abstract Class as well as Interface. They only

allow other classes to inherit from them. And abstract functions must be overridden by the implemented classes. Here are some differences in abstract class and interface.

An interface cannot provide code of any method or property, just the signature. we dont need to put abstract and public keyword. All the methods and properties defined in Interface are by default public and abstract. An abstract class can provide complete code of methods but there must exist a method or property without body.

A class can implement several interfaces but can inherit only one abstract class. Means multiple inheritance is possible in .Net through Interfaces.

If we add a new method to an Interface then we have to define implementation for the new method in every implemented class. But If we add a new method to an abstract class then we can provide default implementation and therefore all the existing code might work properly.

What is the use of Master Pages in Asp.Net?


A master page in ASP.Net provides shared HTML, controls, and code that can be used as a template for all of the pages of a website. Every master page has asp:contentplaceholder control that will be filled by the content of the pages that use this master page. You can create a master page that has header and footer i.e. a logo, an image, left navigation bar etc and share this content on multiple pages. You need not to put these things on every aspx page.

What is the difference between .Net Remoting and Asp.Net Web Services?

ASP.NET Web Services Can be accessed only over HTTP but .Net Remoting Can be accessed over various protocols like TCP, HTTP, SMTP etc.

Web Services are based on stateless service architecture but .Net Remoting support for both stateful and stateless environment.

Web Services support heterogeneous environments means interoperability across platforms but .Net remoting requires .Net on both server and client end.

.NET Remoting provides the fast communication than Web Services when we use the TCP channel and the binary formatter.

Web services support only the objects that can be serialized but .NET Remoting can provide support to all objects that inherit MarshalByRefObject.

Web Services are reliable than .Net remoting because Web services are always hosted in IIS.

Web Services are ease to create and deploy but .Net remoting is bit complex to program.

What would be the common layers in an n- tier architecture based web application?
Common layers in an n- tier architecture

Presentation GUI: Look & Feel ,Html, aspx file, JavaScript, window forms etc.

Controller- Work flow layer: aspx.cs file, means event handlers and Data binding with controls etc.

Business Logic: where we implement business rules like add book, search library etc.

Data Access: SQLHelper.cs like create connection, get DataSet, Execute Query etc.

Physical Data: tables, views, stored procedures, indexes etc.

What are the different state management techniques used in asp.net for web applications? In ASP.Net the state can be maintained in following ways
Server-side state management Application objects Session Variables

Database Client-side state management Cookies Hidden input fields Query String ViewState

How to get records in random order from a sql query in sql server?
In SQL Server we can get records in random order from a sql query using NEWID() Function like: SELECT Subject FROM dbo.forumThreads ORDER BY NEWID()

What is the base class of .NET?


Base class provides a base set of methods that all derived classes can use

Explain assemblies.
Answer 1: Assemblies are similar to dll files. Both has the reusable pieces of code in the form of classes/ functions. Dll needs to be registered but assemblies have its own metadata. Answer 2: Assembly is a single deployable unit that contains information about the implementation of classes, structures and interfaces. it also stores the information about itself called metadata and includes name and verison of the assembly, security information, information about the dependencies and the list of files that constitute the assembly. Assembly also contains namespaces. In the .Net Framework, applications are deployed in the form of assemblies. Answer 3: An assembly is a single deployable unit that contains all the information about the implementation of : - classes - structures and - interfaces An assembly stores all the information about itself. This information is called METADATA and include the name and the verison number of the assembly, security information, information about the dependencies and a lost of files that constitute the assembly. All the application developed using the .NET framework are made up of assemblies. Namespaces are also stored in assemblies

Answer 4: In the Microsoft .NET framework an assembly is a partially compiled code library for use in deployment, versioning and security. In the Microsoft Windows implementation of .NET, an assembly is a PE (portable executable) file. There are two types, process assemblies (EXE) and library assemblies (DLL). A process assembly represents a process which will use classes defined in library assemblies. In version 1.1 of the CLR classes can only be exported from library assemblies; in version 2.0 this restriction is relaxed. The compiler will have a switch to determine if the assembly is a process or library and will set a flag in the PE file. .NET does not use the extension to determine if the file is a process or library. This means that a library may have either .dll or .exe as its extension. The code in an assembly is partially compiled into CIL, which is then fully compiled into machine language at runtime by the CLR. An assembly can consist of one or more files. Code files are called modules. An assembly can contain more than one code module and since it is possible to use different languages to create code modules this means that it is technically possible to use several different languages to create an assembly. In practice this rarely happens, principally because Visual Studio only allows developers to create assemblies that consist of a single code module.

Name some of the languages .NET support?


Some of the languages that are supported by .NET 1. Visual Basic.NET 2. Visual C# 3. Visual C++

ADO.NET features? Benefits? Drawbacks?


Answer 1: 1. Data will be retrieved through Datasets 2. Scalability Answer 2: 1. Disconnected Data Architecture 2. Data cached in Datasets 3. Data transfer in XML format 4. Interaction with the database is done through data commands

How many types of exception handlers are there in .NET?


Answer 1: From MSDN>gt; How the Runtime Manages Exceptions http://msdn.microsoft.com/library/default.asp?url=/library/enus/cpguide/html/cpconexceptionsoverview.asp The exception information table represents four types of exception handlers for protected blocks: A finally handler that executes whenever the block exits, whether that occurs by normal control flow or by an unhandled exception. A fault handler that must execute if an exception occurs, but does not execute on completion of normal control flow. A type-filtered handler that handles any exception of a specified class or any of its derived classes. A user-filtered handler that runs user-specified code to determine whether the exception should be handled by the associated handler or should be passed to

the next protected block. Answer 2: 1. Unstructured Exception Handling 2. Structured Exception Handling

Difference between Panel and GroupBox classes?

Answer 1: Panel and Group box both can used as container for other controls like radio buttons and check box. the difference in panel and group box are Panel 1) In case of panel captions cannot be displayed 2) Can have scroll bars. Group box 1) Captions can be displayed. 2) Cannot have a scroll bar Answer 2: Panel is scrollable. In panel you cant set caption like Group box.

What is the base class of Button control?


Listing from visual studio .net > Button Class System.Object System.MarshalByRefObject System.ComponentModel.Component System.Windows.Forms.Control System.Windows.Forms.ButtonBase System.Windows.Forms.Button

What is Response object? How is it related to ASPs Response object?


Response object allows the server to communicate with the client(browser). It is useful for displaying information to the user (or) redirecting the client. Eg: Response.Write(Hello World)

hat is IIS? Have you used it?


IIS - Internet Information Server IIS is used to access the ASP.Net web applications Yes, I used in ASP.NET web applications.

Main differences between ASP and ASP.NET.


Answer 1: 1. ASP: Code is Interpreted ASP.NET: Code is Compiled 2. ASP: Business Logic and Presentation Logic are in a single file ASP.NET: Business Logic and Presentation Logic are in separate files (.cs or .vb) and (.aspx) respectively. 3. ASP: No Web Server Controls ASP.NET: Web Server Controls supported by strong .NET Framework 4. ASP: No RAD in Classic ASP ASP.NET: Supports RAD

Answer 2: 1.Asp is interpreted Asp.net is compiled which is faster than asp. 2 Asp.net maintains its own CLR and is managed as it runs by CLR Where as asp is unmanaged 3 We can mainatin sessions in state server and sql server which is Outproc, where in asp sessions will be last if we restart webserver or make changes. 4 In asp.net we can configure each application using web.config file which is availble in application itself and we have machine.config wherer we can configure all applications. In asp we cannot configure single aplication 5 Asp.net we have autopostback event which is not in asp 6 In asp.net we have global.asax where can hadle some global things which is not in asp. 7 We have well built GUI to work in asp.net 8 We have ado.net and as well as disconnected architecture in asp.net 9 We have Xcopy deployment in asp.net 10. We can work with any language as code behind technique in asp.net that supports .net frame work Answer 3: a) asp.net is compiled but ASP is a interpretor or script only. b) asp.net is supported more control then the asp. c) asp.net is more supported even control then the asp. d) In asp.net if update any component then no need to shutdown the computer but in asp if loaded any component then need tobe shutdown the computer. d) So lastly an asp.net is faster then asp

What is CLR?
Answer 1: CLR(Common Language Runtime) is the main resource of .Net Framework. it is collection of services like garbage collector, exception handler, jit compilers etc. with the CLR cross language integration is possible. Answer 2: The .NET Framework provides a runtime environment which runs the code and provides services that make the development process easier. This runtime environment in .NET Framework is known as Common Language Runtime (CLR). The CLR sits at the very heart of managed code. Common Language Runtime is the generalized multi-language, reflective execution engine on which code originally written in various languages runs. At a higher level, CLR is simply an engine that takes in Intermediate Language (IL) instructions, translates them into machine instructions, and executes them. Although the common language runtime provides many standard runtime services, managed code is never interpreted. A feature called just-in-time (JIT) compiling enables all managed code to run in the native machine language of the system on which it is executing. The CLR shares much in common with a traditional operating system. Quote: Managed code is the term used for any code that is running on .NET Framework. The CLR provides the infrastructure that enables managed code to execute as

well provides variety of services during execution. When a method, for which IL has been generated, is called for the first time the CLR compiles the IL into native code that is specific to the processor the Environment it is running on (This process is known as Just in Time Compilation or JIT). If the same method is called next time, the existing JIT compiled code is reused. During execution managed code receives variety of services from the runtime environment. Quote: When compiling to managed code, the compiler translates your source code into Microsoft intermediate language (MSIL), which is a CPU-independent set of instructions that can be efficiently converted to native code. Intermediate Language is a binary assembly language that is compiled at runtime down to whatever machine language is appropriate for the host CPU. This runtime compilation is called Just-In-Time Compiling or JIT-compiling. Advantages of Managed Execution Environments In unmanaged environments the compiler and linker directly compile the source code in to native instructions that are targeted at a specific processor. The disadvantage of this process is that each time you want to run your executable on a different platform you will have to re-compile the code using a compiler and linker that will compile the code that is targeted at the specific hardware. This means that each time you want your application to run on a different platform, you will have to ship the compiled instructions again and again. As this leads to compiling and maintaining multiple versions of the same application, the companies try to create a more generalized compiled version in order to target most of the environments. This process is known as the Lowest Common Denominator approach. This leads to a more generalized program which is not optimized properly and does not take advantages of the underlying hardware infrastructure (processor, cache, etc). Because the CLR supplies one or more Just in Time Compiler for each computer architecture it supports, the same set of MSIL can be JIT-compiled and run on any supported architecture. This CLR provides the following benefits for developers: Vastly simplified development. Seamless integration of code written in various languages. Evidence-based security with code identity. Assembly-based deployment that eliminates DLL Hell. Side-by-side versioning of reusable components. Code reuse through implementation inheritance. Automatic object lifetime management. Code access security. Cross Language Integration. Self describing objects. The CLR automatically handles object layout and manages references to objects, releasing them when they are no longer being used. This automatic memory management resolves the two most common application errors, memory leaks and invalid memory references. This process is known as Garbage Collection. The CLR also manages thread execution, code execution, code safety verification, compilation, and other system services. The CLR is designed for the software of the future, and it also supports software of today and yesterday. Interoperability between managed and unmanaged code provided by CLR helps developers continue to use necessary COM components and DLLs.

What is Delegate and what is it used for ?


Delegate is kinda like a pointer to a function in C++ or like an event handler in Java You can use it to multicast which means running multiple functions in different instances of object already created. This is useful when you want your objects to register to an event raised by another object. The way it works is the object you are registered to listen to recieves the delegate of the function it is supposed to run in your object, the delegate is then run from it. (if you switch the word delegate for pointer, this would be much simpler)

How is meant by DLL ?


A DLL (Dynamic Link Library) is a file that can be loaded and executed by programs dynamically. Basically its an external code repository for programs. Since usually several different programs reuse the same DLL instead of having that code in their own file, this dramatically reduces required storage space. A synonym for a DLL would be library.

What is connection pooling and how do you make your application use it?
Opening database connection is a time consuming operation. Connection pooling increases the performance of the applications by reusing the active database connections instead of create new connection for every request. Connection pooling Behaviour is controlled by the connection string parameters. Follwing the the 4 parameters that control most of the connection pooling behaviour. 1. Connect Timeout 2. Max Pool Size 3. Min Pool Size 4. Pooling

What is an interface and what is an abstract class? Please, expand by examples of using both. Explain why.
Answers1: In a interface class, all methods are abstract without implementation where as in an abstract class some methods we can define concrete. In interface, no accessibility modifiers are allowed. An abstract class may have accessibility modifiers. Interface and abstract class are basically a set of rules which u have to follow in case u r using them(inheriting them). Answers2: Abstract classes are closely related to interfaces. They are classes that cannot be instantiated, and are frequently either partially implemented, or not at all implemented. One key difference between abstract classes and interfaces is that a class may implement an unlimited number of interfaces, but may inherit from only one abstract (or any other kind of) class. A class that is derived from an abstract class may still implement interfaces. Abstract classes are useful when creating components because they allow you specify an invariant level of functionality in some methods, but leave the implementation of other methods until a specific implementation of that class is needed. They also version well, because if additional functionality is needed in derived classes, it can be added to the base class without breaking code. Answers3:

Abstract Classes An abstract class is the one that is not used to create objects. An abstract class is designed to act as a base class (to be inherited by other classes). Abstract class is a design concept in program development and provides a base upon which other classes are built. Abstract classes are similar to interfaces. After declaring an abstract class, it cannot be instantiated on its own, it must be inherited. Like interfaces, abstract classes can specify members that must be implemented in inheriting classes. Unlike interfaces, a class can inherit only one abstract class. Abstract classes can only specify members that should be implemented by all inheriting classes. Answers4: An interface looks like a class, but has no implementation. Theyre great for putting together plug-n-play like architectures where components can be interchanged at will. Think Firefox Plug-in extension implementation. If you need to change your design, make it an interface. However, you may have abstract classes that provide some default behavior. Abstract classes are excellent candidates inside of application frameworks. Answers5: One additional key difference between interfaces and abstract classes (possibly the most important one) is that multiple interfaces can be implemented by a class, but only one abstract class can be inherited by any single class. Some background on this: C++ supports multiple inheritance, but C# does not. Multiple inheritance in C++ has always be controversial, because the resolution of multiple inherited implementations of the same method from different base classes is hard to control and anticipate. C# decided to avoid this problem by allowing a class to implement multiple interfaces, which do not contain method implementations, but restricting a class to have at most a single parent class. Although this can result in redundant implementations of the same method when different classes implement the same interface, it is still an excellent compromise. Another difference between interfaces and abstract classes is that an interface can be implemented by an abstract class, but no class, abstract or otherwise, can be inherited by an interface. Answers6: What is an Abstract class? An abstract class is a special kind of class that cannot be instantiated. So the question is why we need a class that cannot be instantiated? An abstract class is only to be sub-classed (inherited from). In other words, it only allows other classes to inherit from it but cannot be instantiated. The advantage is that it enforces certain hierarchies for all the subclasses. In simple words, it is a kind of contract that forces all the subclasses to carry on the same hierarchies or standards. What is an Interface? An interface is not a class. It is an entity that is defined by the word Interface. An interface has no implementation; it only has the signature or in other words, just the definition of the methods without the body. As one of the similarities to Abstract class, it is a contract that is used to define hierarchies for all subclasses or it defines specific set of methods and their arguments. The main difference between them is that a class can implement more than one interface but can only inherit from one abstract class. Since C# doesnt support multiple inheritance, interfaces are used to implement multiple inheritance.

What is serialization, how it works in .NET?


Serialization is when you persist the state of an object to a storage medium so an exact copy can be re-created at a later stage. Serialization is used to save session state in ASP.NET. Serialization is to copy objects to the Clipboard in Windows Forms Serialization is used by remoting to pass objects by value from one application domain to another

What should one do to make class serializable?


Answers1: To make a class serializable is to mark it with the Serializable attribute as follows. [Serializable] public class MyObject { public int n1 = 0; public int n2 = 0; public String str = null;

How would you get ASP.NET running in Apache web servers why would you even do this?
1. Latest Answer: Using mod_aspnet module from apache CLI project. Some organisations don't use IIS as web server as t... Last Updated By Expert on February 16, 2007 2.

Subscribe

(Answers: 1)

Read / Answer Subscribe

Can the action attribute of a server-side tag be set to a value and if not how can you possibly pa
Can the action attribute of a server-side tag be set to a value and if not how can you possibly pass data from a form page to a subsequent page. Briefly describe the role of global.asax.

(Answers: 1) Read / Answer 3. Can you give an example of what might be best suited to place in Subscribe the application_Start and Session_
Can you give an example of what might be best suited to place in the application_Start and Session_Start subroutines?

(Answers: 3)
4.

What is .NET / .NET Framework?

Read / Answer Subscribe

It is a Framework in which Windows applications may be developed and run.The Microsoft .NET Framework is a platform for building, deploying, and running Web Services and applications. It provides ah Latest Answer: .Net framework is a platform for building, deploying and running web services and other applications... Last Updated By Sameeksha on January 13, 2006 5.

(Answers: 1)

Read / Answer Subscribe

What is "Microsoft Intermediate Language" (MSIL)?

A .NET programming language (C#, VB.NET, J# etc.) does not compile into executable code; instead it compiles into an intermediate code called Microsoft Intermediate Language (MSIL). As a programm Latest Answer: MSIL is Microsoft Intermediate Language which is platform independent. Any .Net application is compi... Last Updated By Sameeksha on January 13, 2006

(Answers: 1)

Read / Answer

6.

What is "Common Language Runtime" (CLR)?

Subscribe

CLR is .NET equivalent of Java Virtual Machine (JVM). It is the runtime that converts a MSIL code into the host machine language code, which is then executed appropriately.The CLR is the executio Latest Answer: it is resource of .net work it funtionality is 1.jit(msil to native code)2.garbage collector3.type ... Last Updated By sabir on January 13, 2006 7.

(Answers: 1)

Read / Answer Subscribe

What is "Common Type System" (CTS)?

CTS defines all of the basic types that can be used in the .NET Framework and the operations performed on those type. All this time we have been talking about language interoperability, and .NE Latest Answer: CTS, common type system is the one which brings all .net languages data types on a common platform. ... Last Updated By Sameeksha on January 13, 2006 8.

(Answers: 1)

Read / Answer Subscribe

What is "Common Language Specification" (CLS)?

CLS is the collection of the rules and constraints that every language (that seeks to achieve .NET compatibility) must follow. It is a subsection of CTS and it specifies how it shares and extends Latest Answer: CLS specify certain set of rules to which, each .net languages should follow to achieve the language... Last Updated By rinkujnu on June 23, 2007 9.

(Answers: 2)

Read / Answer Subscribe

What is a Web Service?

A web service is a software component that exposes itself through the open communication channels of the Internet. Applications running on remote machines, on potentially different platforms, can Latest Answer: WebSevice is a reusable software component (ClassLibraries) which exposes the businesslogic in them,... Last Updated By Srinivas on November 14, 2006 10.

(Answers: 2)

Read / Answer Subscribe

What is an assembly?

An assembly is the primary building block of a .NET Framework application. It is a collection of functionality that is built, versioned, and deployed as a single implementation unit (as one or more files). All managed types and resources are marked either as accessible only within their implementation unit, or as accessible by code outside that unit. .NET Assembly contains all the metadata about the modules, types, and other elements it contains in the form of a manifest. The CLR loves assemblies because differing programming languages are just perfect for creating certain kinds of applications. For example, COBOL stands for Common Business-Oriented Language because its tailor-made for creating business apps. However, its not much good for creating drafting programs. Regardless of what language you used to create your modules, they can all work together within one Portable Executable Assembly. Theres a hierarchy to the structure of .NET code. That hierarchy is Assembly -> Module -> Type -> Method." Assemblies can be static or dynamic. Static assemblies can include .NET Framework types (interfaces and classes), as well as resources for the assembly (bitmaps, JPEG files, resource files, and so on). Static assemblies are stored on disk in portable executable (PE) files. You can also use the .NET Framework to create dynamic assemblies, which are run directly from memory and are not saved to disk before execution. You can save dynamic assemblies to disk after they have executed. Latest Answer: the above said answer is good... What is a Metadata?

In Simple words, Meta data is set of tables that describe the types and its members defined in the assembly and the types and its members referenced in the assembly.

Manifest is another set of tables that describe the assembly attributes like the strong name, culture, public key token and the files and resources contained in the assembly. It also describes the publically exported types of the assembly.

Manifest
An assembly manifest contains all the metadata needed to specify the assembly's version requirements and security identity, and all metadata needed to define the scope of the assembly and resolve references to resources and classes. The assembly manifest can be stored in either a PE (Portable Executable) file (an .exe or .dll) with Microsoft intermediate language (MSIL) code or in a standalone PE (Portable Executable) file that contains only assembly manifest information. The following table shows the information contained in the assembly manifest. The first four items the assembly name, version number, culture, and strong name information make up the assembly's identity. Assembly name: A text string specifying the assembly's name. Version number: A major and minor version number, and a revision and build number. The common language runtime uses these numbers to enforce version policy. Culture: Information on the culture or language the assembly supports. This information should be used only to designate an assembly as a satellite assembly containing cultureor language-specific information. (An assembly with culture information is automatically assumed to be a satellite assembly.) Strong name information: The public key from the publisher if the assembly has been given a strong name. List of all files in the assembly: A hash of each file contained in the assembly and a file name. Note that all files that make up the assembly must be in the same directory as the file containing the assembly manifest. Type reference information: Information used by the runtime to map a type reference to the file that contains its declaration and implementation. This is used for types that are exported from the assembly. Information on referenced assemblies: A list of other assemblies that are statically referenced by the assembly. Each reference includes the dependent assembly's name, assembly metadata (version, culture, operating system, and so on), and public key, if the assembly is strong named.

What is a Strong Name?

Total Answers and Comments: 1 A strong name consists of the assembly's identity its simple text name, version number, and culture information (if provided) plus a public key and a digital signature. It is generated from an assembly file (the file that contains the assembly manifest, which in turn contains the names and hashes of all the files that make up the assembly), using the corresponding private key. Assemblies with the same strong name are expected to be identical. Strong names guarantee name uniqueness by relying on unique key pairs. No one can generate the same assembly name that you can, because an assembly generated with one private key has a different name than an assembly generated with another private key. When you reference a strong-named assembly, you expect to get certain benefits, such as versioning and naming protection. If the strong-named assembly then references an assembly with a simple name, which does not have these benefits, you lose the benefits you would derive from using a strong-named assembly and revert to DLL conflicts. Therefore, strong-named assemblies can only reference other strong-named assemblies. There are two ways to sign an assembly with a strong name: 1. Using the Assembly Linker (Al.exe) provided by the .NET Framework SDK.

2. Using assembly attributes to insert the strong name information in your code. You can use either the AssemblyKeyFileAttribute or the AssemblyKeyNameAttribute, depending on where the key file to be used is located. To create and sign an assembly with a strong name using the Assembly Linker, at the command prompt, type the following command: al /out:<assembly name> <module name> /keyfile:<file name> In this command, assembly name is the name of the assembly to sign with a strong name, module name is the name of the code module used to create the assembly, and file name is the name of the container or file that contains the key pair. The following example signs the assembly MyAssembly.dll with a strong name using the key file sgKey.snk. al /out:MyAssembly.dll MyModule.netmodule /keyfile:sgKey.snk To sign an assembly with a strong name using attributes In a code module, add the AssemblyKeyFileAttribute or the AssemblyKeyNameAttribute, specifying the name of the file or container that contains the key pair to use when signing the assembly with a strong name.

What is GAC?

Total Answers and Comments: 2 The global assembly cache stores assemblies specifically designated to be shared by several applications on the computer. You should share assemblies by installing them into the global assembly cache only when you need to. Assemblies deployed in the global assembly cache must have a strong name. When an assembly is added to the global assembly cache, integrity checks are performed on all files that make up the assembly. The cache performs these integrity checks to ensure that an assembly has not been tampered with, for example, when a file has changed but the manifest does not reflect the change. Use a developer tool called the Global Assembly Cache tool (Gacutil.exe), provided by the .NET Framework SDK or Use Windows Explorer to drag assemblies into the cache. To install a strong-named assembly into the global assembly cache At the command prompt, type the following command: gacutil I <assembly name> In this command, assembly name is the name of the assembly to install in the global assembly cache

What is Delegation?

Total Answers and Comments: 2 A delegate acts like a strongly type function pointer. Delegates can invoke the methods that they reference without making explicit calls to those methods. Delegate is an entity that is entrusted with the task of representation, assign or passing on information. In code sense, it means a Delegate is entrusted with a Method to report information back to it when a certain task (which the Method expects) is accomplished outside the Method's class.

What is the difference between "using System.Data;" and directly adding the reference from "Add References Dialog Box"?

Total Answers and Comments: 1 When u compile a program using command line, u add the references using /r switch. When you compile a program using Visual Studio, it adds those references to our assembly, which are added using "Add Reference" dialog box. While "using" statement facilitates us to use classes without using their fully qualified names. For example: if u have added a reference to "System.Data.SqlClient" using "Add Reference" dialog box then u can use SqlConnection class like this: System.Data.SqlClient.SqlConnection But if u add a "using System.Data.SqlClient" statement at the start of ur code then u can directly use SqlConnection class. On the other hand if u add a reference using "using System.Data.SqlClient" statement, but don't add it using "Add Reference" dialog box, Visual Studio will give error message while we compile the program.

Вам также может понравиться