c# - Convert a Collection of Strings into Collection of GUID -


i reading collection of strings (of guid format) excel , want store them in database collection of guids. wondering there clean way convert list<string> list<guid> using linq. not interested in looping through.

either linq:

list<guid> guids = guidstrings.select(guid.parse).tolist(); 

or list.convertall little bit more efficient because knows size:

list<guid> guids = guidstrings.convertall(guid.parse); 

Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

unity3d - Fatal error- Monodevelop-Unity failed to start -