简体   繁体   English

将C#HashSet转换为F#Set

[英]Convert C# HashSet to F# Set

I have code that is shared between F# and C# and I need to convert between the C# HashSet and the F# Set. 我有在F#和C#之间共享的代码,我需要在C#HashSet和F#Set之间进行转换。 Is there an easy way to do this? 是否有捷径可寻?

对于用于F# -Set的类型还有其他限制 - 如果你可以支持它们,你可以使用Set.ofSeq将它从你的HashSet转换 - 但我只是使用原始的HashSet(可能是封装的) - 不需要额外的工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM