473,385 Members | 1,958 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Convert String to GUID that is Compliant with Option Strict

I have the the folllowing code that works when Option Strict is Off:

Dim SearchID as string = "2F0B92F1-23E5-4CFA-B8D6-FAFEADE90EBC"
Dim SearchGUID As Guid
SearchGUID = GetConverter(SearchGUID).ConvertFrom(SearchID)

GetConverter is used with the following Imports Object:
Imports System.ComponentModel.TypeDescriptor

Is there a different way to convert a string to a GUID that is compliant
with Option Strict ON?

Thanks.
Nov 21 '05 #1
2 10423
"jmhmaine" <jm*@online.nospam> schrieb:
I have the the folllowing code that works when Option Strict is Off:

Dim SearchID as string = "2F0B92F1-23E5-4CFA-B8D6-FAFEADE90EBC"
Dim SearchGUID As Guid
SearchGUID = GetConverter(SearchGUID).ConvertFrom(SearchID)

GetConverter is used with the following Imports Object:
Imports System.ComponentModel.TypeDescriptor

Is there a different way to convert a string to a GUID that is compliant
with Option Strict ON?


\\\
Dim g As New Guid("2F...BC")
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Nov 21 '05 #2
Gotta love the simple solutions, thanks!

"Herfried K. Wagner [MVP]" wrote:
"jmhmaine" <jm*@online.nospam> schrieb:
I have the the folllowing code that works when Option Strict is Off:

Dim SearchID as string = "2F0B92F1-23E5-4CFA-B8D6-FAFEADE90EBC"
Dim SearchGUID As Guid
SearchGUID = GetConverter(SearchGUID).ConvertFrom(SearchID)

GetConverter is used with the following Imports Object:
Imports System.ComponentModel.TypeDescriptor

Is there a different way to convert a string to a GUID that is compliant
with Option Strict ON?


\\\
Dim g As New Guid("2F...BC")
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: James DeClerk | last post by:
Hi everyone. I have a guid that's in string format. I would like to convert it to a GUID. I'm doing this on the unix platform, so it will apply to only to GCC/G++. #include "stdafx.h"...
1
by: Paul W | last post by:
How do I do this with: Option Strict On? I know of the function System.Text.ASCIIEncoding.GetChars, but that takes a Byte array not a DataRow. So with Option Strict On, how do I take the byte...
12
by: DC Gringo | last post by:
How can I convert this pubLatest to a date with format "m/d/yyyy"? Dim pubLatest As New Date pubLatest = Me.SqlSelectCommand1.Parameters("@pubLatest").Value -- _____ DC G
14
by: Nak | last post by:
Hi there, Does anyone know how I would get the value of the assembly GUID in code from within the same application? Thanks in advance. Nick. --...
5
by: jan axelson | last post by:
My application is using RegisterDeviceNotification() to detect attachment and removal of a USB HID-class device. The form is receiving WM_DEVICECHANGE messages with wParam set to...
3
by: Rich | last post by:
Hello, I am converting an app from VB6 to VB.Net and have encountered the following problem. I have the following loop which retrieves objects from a collection of objects. Dim entry As...
2
by: Jason | last post by:
In VB.NET, when I use System.Convert.ToDouble(string Val) to convert a string variable to double variable, I got something interesting: Dim stringVal As String = "101.01" Dim doubleVal As Double...
5
by: Atara | last post by:
I am trying to convert the following code to VB .Net, I still have some gaps (the lines that are marked with (*)) and also I need an ending condition for the while loop. any help would be...
1
by: Wolf | last post by:
Hi I am trying to set a property(PartyHomeAddressID) = to a guid in a ini file. But everytime when the ini file has an empty guid it breaks with an error tellin me a guid is 32 char long with 4...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.