C#XNA的Xbox HashSet的元组和 [英] C# XNA Xbox HashSet and Tuple

查看:169
本文介绍了C#XNA的Xbox HashSet的元组和的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

C#XNA的Xbox在这种情况下,可选参数不是可选

由于从上面的问题,帮助现在的可选参数都工作,或者至少看起来好像他们应该工作

Thanks to help from the above question optional parameters are now working, or at least appear as if they should work.

不过我现在被困在HashSets和元组,没有出现可用两种。

However I'm now stuck on HashSets and Tuples, that don't appear to be available either.

我可以写我自己的两个类的版本。元组从无到有,HashSet的使用Dictonary(可能)。不过,我宁愿坚持使用标准的。

I could write my own version of both classes. Tuple from scratch and HashSet using a Dictonary (possibly). However I'd rather keep to using the standard ones.

如果在图书馆的电脑verstion存在这些类,那么我可以复制它们从PC C#粘贴图书馆到我自己的代码?

If these classes exist in the PC verstion of the library, then can I copy and paste them from the PC C# library into my own code?

在HashSet的[从元数据]使用转到定义的结果,是C ++头文件类似,因为它显示的类接口,但。没有实现

Using "Go To Definition" results in "HashSet [from metadata]" and is C++ header file like in that it shows the classes interface but no implementation.

在这里续:的 stackoverflow.com/questions/10246572/c-sharp-hashset2-to-work-exactly-like-the-standard-c-sharp-hashset-not -compilin

推荐答案

有都是非常基本的数据结构,你可以做你自己的。

There both very basic data structures you can just make your own.

这是HashSet的。

和这里是一个元组只需添加更多的项目需要。

And Here is a Tuple just add more items as needed.

public class Tuple<T1, T2> 
{ 
   public T1 Item1 { get; set; } 
   public T2 Item2 { get; set; } 

   public Tuple(T1 item1, T2 item2) 
   { 
      Item1 = item1; 
      Item2 = item2; 
   } 
} 

这篇关于C#XNA的Xbox HashSet的元组和的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆