Re: Structure Assignment

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Herfried K. Wagner [MVP] (hirf-spam-me-here_at_gmx.at)
Date: 05/30/04


Date: 30 May 2004 18:50:07 +0200


* "Vadim Rapp" <vr@myrealbox.nospam.com> scripsit:
> Is there a way to assign a structure from the result of
> <structure>.ToString in one statement?
>
>
> For instance, if such function existed, it might look like this:
>
> Me.Size = OurFunction(Me.Size.Tostring)

There is no general way to do that. You can look if the type has a
'Parse' method and then use this method to construct an object of the
type from the data contained in the string.

-- 
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>


Relevant Pages

  • Re: Read webpage with VB app
    ... but then you will have to parse the frameset to get the URLs of ...
    (microsoft.public.dotnet.languages.vb)
  • Re: UC Problem
    ... nicht von 'String'. ... Herfried K. Wagner [MVP] ...
    (microsoft.public.de.vb)
  • Re: fokussiertes Control als string?!
    ... > jetz möchte ich die gerade aktive textBox als string ... Herfried K. Wagner [MVP] ...
    (microsoft.public.de.german.entwickler.dotnet.csharp)
  • Re: string to hex oder decimal to hex
    ... > hex und decimal bzw. string? ... Herfried K. Wagner [MVP] ...
    (microsoft.public.de.german.entwickler.dotnet.csharp)
  • Re: Loop problem at runtime
    ... It's much more complicated to parse. ... If it's in an app.config format, ...
    (microsoft.public.dotnet.languages.vb)