Can C# do the same things as Visual Basic

Hello!

I'm somewhat confused if C# can do the same things that VB can do?

Everytime i see a reference about C#, it always is in conjuction with the .NET framework, which leads me to think that C# can only be used on web?

What's driving me here is that i need to write some kind of utility to monitor a dedicated MSOutlook mailbox for incoming Adobe forms and when a new one comes in, i need to read the Adobe XML and upload it to an Oracle DB!

And being mainly a Java, C++ programmer, i can definitely relate to C# alot more than VB, so if C# can be run on an individual PC like a VB program, that would music to my ears!

Appreciate any clarification on this semi-urgent matter!
Thanks much!
BobK

[717 byte] By [bobk544] at [2007-12-16]
# 1
ms created a new language c# esp. for .net and considering its origin from C,c++, C#
is quite powerful than vb.net. even the compiler for c# generates more efiicient code than vb.net. also some data types specified in clr are not supported in vb.net.
asp.net was entirely written in c#. so u can understand its versatility.
the only caveat of c# was the lack of good intellisense features in vs.net 2003 which
has been greatly improved in vs c# 2005.
check out vc# express 2005 for urself.
C# can be used to write any type of apps,web services, asp.net codebehinds, windows services...
connect2sandeep at 2007-9-9 > top of Msdn Tech,Visual C#,Visual C# General...
# 2

First of all, .Net Framework is not just for the web. You can create stand-alone applications based on .Net Framework.

And yes, you can create programs using C# that can run on an inidividual PC like a VB program - and I'm sure this would definitely be music to your ears :)

VijayeRaji at 2007-9-9 > top of Msdn Tech,Visual C#,Visual C# General...
# 3
Hi,

You can do everything that you can do in Visual Basic. In .NET, the concept has changed from depending on a language to depending on a common Framework - the .NET Framework. You can utilize all the classes in the framework which provide the functionality and infrastructure required to build web and windows applications from any language - VB or C#.

Yes, You can build desktop applications [apps that run in an individual PC] in C#

Regards,
Vikram

Vikram at 2007-9-9 > top of Msdn Tech,Visual C#,Visual C# General...
# 4

As far as language syntax goes:
VB offers about as many features that C# doesn't have that C# offers that VB doesn't have, but the differences are not show-stoppers either way:

C#:
- allows unsafe code
- has the 'as' operator (but VB has it in 2005 - 'TryCast')
- allows assignments within expressions (e.g., if ((x = y.Value) == 2))
- operator overloading (but VB has this for 2005)

VB:
- has optional parameters
- allows types within interfaces (although I've never used this)
- has a very flexible Select construct (much, much more flexible than 'switch')
- has the "When" filter for catch block headers

David Anton
www.tangiblesoftwaresolutions.com
Home of:
Instant C#: VB.NET to C# Converter
Instant VB: C# to VB.NET Converter
Instant J#: VB.NET to J# Converter

DavidAnton at 2007-9-9 > top of Msdn Tech,Visual C#,Visual C# General...
# 5
Wow!

These comments are definitely music to my ears!

I can definitely relate to C# because of my Java experience, so maybe in can do some of the Windows things i've always felt were inaccessable!

Just a background, i took an MFC course years ago and couldn't get past first base with it and never looked back!

Thanks everyone for your great comments and advise, says something very good about the MSN community!

Have a great year all!

bobk544 at 2007-9-9 > top of Msdn Tech,Visual C#,Visual C# General...
# 6
Ok now that i know that i can use C#, i can't wait to get started!
So what i need to do is, when an email arrives into a dedicated mailbox, i need to read the attachment, an Adobe form/pdf file, and extract XML data from that form!

I then need to upload that XML data to an Oracle DB on Solaris, and for that part, i've already created that piece using a Java API!

Eventually, if this project gains momentum, we will want to move it up to a server, but for right now, it's mainly a prototype effort!

So my next step then, is to try and find some existing C# APIs to access the MSNOutlook server, and if anyone thinks i might run into any problems in that approach, i'd appreciate any suggestions, ie maybe C# doesn't have as well defined Outlook Api as compared to VB ect!

Thanks again everyone!

bobk544 at 2007-9-9 > top of Msdn Tech,Visual C#,Visual C# General...
# 7
Hi,

Outlook exposes an object model which you use from C#. This is a Object Model exposed by Outlook and you need to access it using COM Interop.

Here are good links to get started:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vstechart/html/ol03csharp.asp

http://support.microsoft.com/?kbid=819398

Office Articles:
http://www.microeye.com/resources/res_tech_vsnet.htm
Regards,
Vikram

Vikram at 2007-9-9 > top of Msdn Tech,Visual C#,Visual C# General...