02.07.2013 Views

.NET Interview Questions 4 th Edition By Shivprasad ... - A2Z Dotnet

.NET Interview Questions 4 th Edition By Shivprasad ... - A2Z Dotnet

.NET Interview Questions 4 th Edition By Shivprasad ... - A2Z Dotnet

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Figure 1.20: - Different Display depending on version numbers<br />

Note:- Source code is provided in “versioning” folder. But as you<br />

compile <strong>th</strong>e DLL’s different publicToken numbers are created so you need<br />

to run <strong>th</strong>e sn.exe in your machine and change <strong>th</strong>e token number<br />

accordingly in <strong>th</strong>e “App.config” file.<br />

(A)What is CodeDom?<br />

“CodeDom” is an object model <strong>th</strong>at represents actually a source code. We can generate real C#<br />

and VB.<strong>NET</strong> from codedom. It is designed to be language independent - once you create a<br />

“CodeDom” hierarchy for a program, we can <strong>th</strong>en generate <strong>th</strong>e source code in any .<strong>NET</strong><br />

compliant language. So let us try to do some<strong>th</strong>ing real practical and simple to just get a feel of<br />

how powerful “CodeDom” is.<br />

Note:- You can get <strong>th</strong>e source code in CD in “CodeDom” folder.<br />

We will try to generate <strong>th</strong>e following code below. The below code which will be generated does<br />

not do any<strong>th</strong>ing special buy just displays a hello message and waits for <strong>th</strong>e key to be pressed.<br />

namespace <strong>Interview</strong><strong>Questions</strong><br />

{<br />

Using System;<br />

Public class Entry Point<br />

{<br />

Public static void Main ()<br />

{<br />

System.Console.WriteLine (“Hello from <strong>Interview</strong> Question series”);<br />

System.Console.ReadLine ();<br />

}<br />

}<br />

}

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!