简体   繁体   English

将HashTable类型的ac#对象作为参数传递

[英]Pass a c# object of type HashTable as argument

Is it possible (in C#) to pass an object of type HashTable as a parameter to a method? 是否可以(在C#中)将HashTable类型的对象作为参数传递给方法?

I'm trying to, but it seems (at debug-time) impossible to reference the object (i'm getting a null reference object). 我正在尝试,但是(在调试时)似乎无法引用该对象(我正在获得一个空引用对象)。

Is it possible (in C#) to pass an object of type HashTable as a parameter to a method? 是否可以(在C#中)将HashTable类型的对象作为参数传递给方法?

It is possible. 有可能的。

public void MyMethod(HashTable ht) {

(i'm getting a null reference object). (我得到一个空引用对象)。

This is probably because you're passing null . 这可能是因为您传递了null

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

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