>        Const c1FullAddr as String = "1 Colonial Drive  Parma  Ohio 21321"
>
> Then they follow that up with another constant:
>
>        Const   c1FaLen as String = c2FullAddr.length
>
> In VB.Net you cannot do this.  Is there a way to do this without having to
> count the length of c1FullAddr and hard coding the value or without changing
> it from a constant?

How about:

Const c1FaLen = Convert.ToString(c1FullAddr).Length ?

On Wed, Aug 6, 2008 at 6:25 PM, Peter Ritchie
<[EMAIL PROTECTED]> wrote:
> As you've guessed, there's no compile-time ability to get the length of a
> string (or to execute any member of any const at compile-time).

Can I ask in the interest of increasing my understanding - where does
'compile time' come into it?

-- stuart

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to