如何将字符串转换为C中的Cassandra.TimeUuid#

问题描述:

我在c#中使用Cassandra数据库。我有一个用户表,它具有TimeUuid类型的UserId列。现在情况是我必须在第三方库的方法中传递UserId作为字符串参数。在这种方法中,我必须将此字符串转换为Cassandra.TimeUuid如何将字符串转换为C中的Cassandra.TimeUuid#

如何将此字符串转换为Cassandra.TimeUuid

感谢

目前创建一个从字符串TimeUuid实例的唯一方法就是要做到:

TimeUuid time = (TimeUuid) Guid.Parse(value); 

得益于implicit conversion operator defined in TimeUuid class

这不是很直观,所以我创建了一个ticket to expose TimeUuid.Parse() method