|
C# goes more deeply than VB.NET ??
I really don't get the picture about what are the big diferences between both languages.
Thanks for the answers.
Carlos Mariano
|
|
|
|
|
First some similarites:
:: They both use the .NET framework. That means that there is very little difference in what you can do with the languages.
:: They both compile to IL code, using a JIT compiler to produce the final executable. Well written code in each language results in very similar IL code, so they perform about the same.
:: They both are fully object oriented (as opposed to VB 6, which is not).
Then some differences:
:: C# is a relatively new language, based on the better parts of Java, C++ and Pascal (Delphi), while VB.NET suffers a bit from being based on VB 6, and also suffers from being based on BASIC, a language that is over 40 years old...
:: C# uses strict data typing, while VB.NET uses implicit conversions. You have to specify most data type conversions in C#, while VB.NET will automatically perform conversions in the background. The automatic conversions makes some things easier, but it's quite easy to use expensive conversion by mistake if you don't know what you are doing.
:: The syntax of VB.NET is very similar to VB 6, which makes it compelling for old VB 6 programmers. The syntax of C# is similar to C++, which makes it compelling for C++ programmers.
It's a good idea to get some knowledge in both C# and VB.NET, as that makes it a lot easier if you find example code that you need to convert. It also gives a deeper knowledge in how .NET works.
---
Year happy = new Year(2007);
|
|
|
|
|
Guffa wrote: :: C# uses strict data typing, while VB.NET uses implicit conversions. You have to specify most data type conversions in C#, while VB.NET will automatically perform conversions in the background. The automatic conversions makes some things easier, but it's quite easy to use expensive conversion by mistake if you don't know what you are doing.
You can override this behaviour in VB.NET by setting OPTION STRICT on it.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Now I have more ideas about both languages.
Ok, thank you all for the replies.
Carlos Mariano
|
|
|
|
|
I don't know if i'm looking in the wrong places or if MS are trying to keep things as murky as possible but i'm very confused by all the info coming out of redmond about Vista .Net 3 and DirectX. I'll write down what seems to be the case and if anyone knows better can they chip in?
1 .Net 3.0 ships with vista but is available for XP. It can be developed using VS 2005 which is not supported on vista but will be Post-SP1. I'm not clear whether post-SP1 means that it will work once you've installed SP1 or whether they'll release a compatibility fix Post SP1.
2. DirectX update Nov 2006 contains DirectX 10 which gets the best out of the interface provided by Vista. This update does not work on Pre-ME releases of windows. I couldn't find whether DX10 was available for 2k3 server or XP or whether something different installs on those platforms.
This makes me think. Say I want to create a DX10 .Net app for vista, how would I go about developing it?
If anyone has any more authoratative links on these subjects i'd love to see them. If i find any better info on my hunt i'll post back here.
Thanks in advanced
Russell
|
|
|
|
|
Would you rather put your interfaces and basic stuff in a namespace called ComponentModel or ObjectModel? Any other namespaces that suits for that need?
myMsg.BehindDaKeys = "Chris Richner";
|
|
|
|
|
Is there a way to restart the application after it returned from a Application.Run() call. I know it can be done, spawning a process using Process.Start(). I want to restart the message pump in the same thread. Is this possible in .Net 1.1 ?
mfer
|
|
|
|
|
Just call Application.Run again, I would have thought.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi this is a simple question. How should I go about subclassing a control in .Net.
I know I can just inherit from the parent class I want like MyClass : ParentControl but after this step I'm not sure in which direction to proceed.
I added the control in my Toolbox, but I can't add it on a screen. My guess is I'm missing something. Like maybe a method I must absolutly override or something.
Any help would be appreciated.
|
|
|
|
|
If you're say inheriting from a control that you can just drop onto the form then there's no need to override anything just to allow you to display it. It should work automatically.
I have no idea what I just said. But my intentions were sincere.
|
|
|
|
|
Insert Cool Screen Name Here wrote: Any help would be appreciated.
Google can help: MSDN C# subclass windows forms
led mike
|
|
|
|
|
If you derive from an existing control, it iwll work exactly like the existing one, until you add methods. Try adding an instance of the base class with the designer, and hand change the code to make it the derived class.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi All
Does anyone know any good alternatives for source control of .Net applications other than Visual Source Safe
Thanks a lot
Regards,
Happy
|
|
|
|
|
How about Sourcegear's Vault[^]
I've used it before and it is pretty good. Much better than VSS.
|
|
|
|
|
check SourceGear. It blows VSS away.
|
|
|
|
|
VSTS rocks ( but is expensive ).
Evolution is pretty good. Some people swear by CVS, I hate it. Try googling for source control - truth is, the fact that your app is .NET is irrelevant to a source control system.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Try Source Gear Vault[^]. Been using it almost a year now. Interface looks like source safe, but works better. Repository is SQL Server DB, although I'm pretty sure you can use other RDBMS. Works great over internet as well. Several of us work from home and Source Safe was a huge pain. No problems now.
|
|
|
|
|
Mark J. Miller wrote: Try Source Gear Vault[^]. Been ... Works great over internet as well. Several of us work from home and Source Safe was a huge pain. No problems now.
Absolutely agree. It is a fantastic product for distributed teams.
|
|
|
|
|
As you want to do this 'in the browser', the ASP.NET forum is really the place to ask, or perhaps the Web Dev forum ? The .NET Framework forum doesn't get a lot of traffic.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
My advice would be in this case:
1. Don't go to far with the graphics in the user interface. The fancier the looks the more data the user will need to download from the server. There's another reason for not doing too much graphics, it consumes more memory and CPU to render.
2. Don't load too much into memory, but don't load too little into memory either. This is a hard one, as you have to balance between more CPU power and less memory or more memory and less CPU power. Typically you need more memory if you load a lot of data and don't use paging. On the other hand paging increases CPU usage as you have to get data from the datastore every time your user switches pages.
To measure the performance, you need something like ants profiler. Also I recommend you actively use FxCop to get best results out of the .NET framework.
Hope this helps
WM.
What about weapons of mass-construction?
"You can always try to smash it with a wrench to fix that. It might actually work" - WillemM
|
|
|
|
|
Hi all,
what is shawdoing? what is the difference b/w over loading & shadowing?
i read this in mSDN but i am still confused with this concept.
please can anyone explain me what is this Shadowing?
Thanks in advance
Rahi
If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
By overloading a method you get an alternative for that method. By shadowing a method you simply hide the other version of the method and it becomes inaccessable.
WM.
What about weapons of mass-construction?
"You can always try to smash it with a wrench to fix that. It might actually work" - WillemM
|
|
|
|
|
Thanks now i got to know what Shadowing is. When ever i post some question in this forum by expecting this type of answers but i am not receiving exact response from the forum members. They are asking to read from the sites and books etc., they are correct. Atleast they are showing me the way but after reading from the book only i am posting my questions here. Some times i got struck (hang-up) with some topics may be they are very simple. as i am new to this technology..i need simple explaination like what u dropped here for shadowing....
Thanks once again for ur response.
Rahi
If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Overloading can occur with in the same class too, for eg:
<br />
public int addnumbers(int a, int b)<br />
{<br />
return a+b;<br />
}<br />
public int addnumbers(int a, int b, int c)<br />
{<br />
return a+b+c;<br />
}<br />
Method Hiding can happen only when inheritance comes to picture
<br />
public class Maths<br />
{<br />
public Maths()<br />
{<br />
}<br />
public int addnumbers(int a, int b)<br />
{<br />
return a+b;<br />
}<br />
}<br />
public class TwoMaths : Maths<br />
{<br />
public TwoMaths()<br />
{<br />
}<br />
<br />
public int addnumbers(int a, int b)<br />
{<br />
return a+b;<br />
}<br />
<br />
}<br />
|
|
|
|
|
thanks for ur response. really ur example is very simple and clear. this will be a very good example for those candidates(like me) who are new to this .net technology i came to know what shadowing is with ur's and willem's explanation.
now i can read some more about shadowing from books & Sites.
Thanks once again,
Rahi
If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|