Advertisment

FAQs on .Net

author-image
PCQ Bureau
New Update

C# is very much in the news these days and hence I have some queries.



1) C++ is a superset of C. Of what language is C# a superset of? 


2) Is it more close to C or more close to Java?


3) What are the advantages of C# over C and Java?


4) What can be done with C#, but not with C or Java?


5) Java is used directly for Web development not C. Can C# be used directly for Web development?


6) To develop a system-level software or embedded system, which is the most appropriate language to use?


7) Which language is faster: C, C++, C# or Java?


8) Like Java with JVM, can C# be system independent?


9) Can you suggest a good book to learn C# for a person who knows a little about C and Java?







Advertisment

CHANCHAL KUMAR SAHA

PCQuest: That is quite a lot of question. So here are the answers in the

same order.

1) No, C# isn’t a superset of any other language. It was designed from scratch by Microsoft taking into consideration the best programming concepts of various development environments like C++, COM etc. 

Advertisment

2) Syntactically, C# is more close to C/C++. Conceptually, and from the point of view of how C# programs work, C# and Java have many similarities. However, they aren’t identical and many differences exist. For example, in Java, data types like int are actually non-object in nature, but have classes wrapped around them. In C# such primitive types are totally object oriented. 

3, 4 & 8) C# and Java fall into a programming world that’s a lot different from the world of C programming. While C programming essentially results in producing code that is micro-processor dependent, and the programming environment (like C or C++), may or may not be object oriented in nature, C# and Java produce code that targets an intermediate virtual machine (VM). Thus, the developer doesn’t target the microprocessor, but the VM, which can exists for various microprocessors and OSs. Hence, the developer’s concerns are limited to the VM, and thus, the code is microprocessor independent, because once it is produced, it will run on any microprocessor, where the VM is present. Regarding how C# scores over Java: well, C# targets the .Net VM called CLR (Common Language Runtime) which forms the basis of the .Net framework. And today, there are over 20 languages written for .Net framework. This means that a C# developer could use a ‘binary’ code produced by PERL.Net and pass results to VB.Net code. Thus, cross language interoperability exists, which isn’t the case for the JVM, because only Java targets it. 

5) Of course, C# can be used for Web development. Actually, not only C#, but “any” .Net compliant language can be used for Web development, be it C#, or VC++.Net, VB.Net, LISP.Net, Perl.Net, etc. Since only Java exists for JVM, both are used almost as synonyms to each other, which isn’t right. 

Advertisment

6) Use Embedded Visual Studio. And if it carries, C#, good enough. But as of the moment, we don’t know if Microsoft is out with embedded Visual Studio.Net. However, for device driver level, we still use assembly and C. 

7) Fast execution has different meaning in different contexts. Actually, we can’t compare environments like Java or C# with C/C++, because both are targeting different kind of environments (virtual and native). However, comparisons can be made within an environment. So, depending upon how you write code and optimize it, one language can score over the another. Of course, on Windows platforms, it has been shown that C# scores over Java.

9) Try C# and .Net platform, (APress) by Andrew Troelson, A Programmers Introduction to C#, (APRess) by Eric Gunnerson (he is the lead for C# development team).

Advertisment

I would like to have the full training materials on C#. My theoretical knowledge in C++ on Unix is quite good, which I acquired through class room tutorials and reading books. I would like to master .Net environment and shall be highly obliged for any help in this regard.

MANOJ MONDAL

PCQuest: There are any number of books on C# and .Net. See the answer to question 9 above. PCQuest has carried a six article series on C# programming sometime back. They are available at www.pcquest.com. We have been regularly carrying articles on .Net for some time now. And starting with this issue, you have a regular series on .Net.

Advertisment

I am a PCQuest subscriber for the last two years, and a regular reader of all the articles. In this last year you have published a lot of useful information on .Net technology. You have also published a series on C#. Apart from that from time to time you have given related software on the CDs every month. My query is related to .Net technology. I am a software developer who is working on Java and VB platform, and to prepare for the future I want to start experimenting /exploring the .Net technology (specially VB.Net, C#, ASP.Net). My queries are as follows.

1 What are the hardware and software resources required to start learning above mentioned technologies (specially VB.Net, C#, ASP.Net). I know that you have provided some information regarding this but i think it is

insuffiecient.

2 I have two OS on my machine–Win 98 and Win 2000 server. I have put VB 6.0 on 98 while 2000 has only the operating system up till now. Is it possible to install VB.Net on this machine. 

Advertisment

3 During a discussion in our group some guys told me that VB.Net only supports SQLServer database. Can you throw some light on this.

4 I assume that I can use VB.Net for my current standalone applications in client-server environment rather then for Net-based applications. What do you say?

5 Lastly, what are the online resources available for this? What are the extra software that we have to download which you have not provided?PCQuest has already awarded me a book on VB.Net and honored me as a PCQuest contest winner. I hope you will help me in this regard and this information will be helpful to so many other developers. 

Advertisment

PARAG C MEDSINGE, Jak Infosolutions, Nagpur

PCQuest: 1) To work with .Net, you should have a system with at least 128 MB RAM. That will give you a good performance. As far as processor speeds go, take your pick, since most of the processors these days are high-speed entities.

You can start to work with .Net, with a bare minimum of the .Net SDK, which is a 131 MB download, and also distributed on CD by various magazines. However, if you wish to work with VS.Net, with the MSDN installed to help you when you have a query, have about 3 GB, for installation of VS.Net Prof, including VC++.Net, VC#, VB.Net, ASP.Net, and MSDN.

2) Yes, you can install VS.Net on either Win 98 or Win 2000. It won’t create any problem with VS 6. 

3) No, .Net just doesn’t support SQL Server only. It has specialized classes to work with SQL server, but supports complete database access via, both ODBC and OLEDB, for which the relevant drivers are available (which all major databases have). So, you can work very easily with Access, SQL Server, Oracle, etc in .Net 

4) Yes, you can use VB.Net for any kind of applications: desktop based, distributed, or traditional client-server application. You will not lose on performance in any manner when designing either kind of applications. 

5) Microsoft’s has dedicated to .Net, many of its own portals: www.asp.Net

is for ASP.Net and related resources, www.gotdotNet.com

is a general purpose portal, Microsoft India’s www.experiencedotNet.com

is another portal where you have discussion forums, articles, software, expert chats, download, and lots

more.

Advertisment