Re: 2 extreme newbie ?s

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Opher Shachar (opher_at_ladpc.co.il)
Date: 08/15/04


Date: Sun, 15 Aug 2004 12:01:53 +0200


"Hari" <harixseshadri@yahoo.com> כתב
בהודעה:GbGdnc45su5ZloDcRVn-vA@adelphia.com...
> I just started programming in Visual Basic.NET about a month ago, so I am
> completely oblivious as to which libraries to look in. However, I have
good
> experience with Java and C.
Q: Why are'nt you coding in C#?

> [snip]
> Dim str As String = "8.93"
> Dim num As Double
> num = ???
> If I want num to be set to 8.93, which method of the String class should I
> use?
try:
    num = Double.Parse(str)
hint: put it in a try...cath clause

> When I implement the Try... Catch... Finally set, I can't quite get the
> clause to function the way I want it to. Take the following piece of code:
> ____ 'Start
> Dim slots(3) As Integer
> Try
> slots(4) = 3
> Catch Except As IndexOutOfBounds 'or something
> 'catch code here
> Catch Except As Exception
> 'other catch code here
> ___ 'End
> [snip]
Before .Net I coded in VB6. Intuitively your code should work...



Relevant Pages