首页 \ 问答 \ 哈希表A等于HashtAble B控件(Hashtable A equals HashtAble B control)

哈希表A等于HashtAble B控件(Hashtable A equals HashtAble B control)

你好,我有两个哈希表对象,其中的键/值对是相同的,我想检查两个哈希表键/值对是否相等。

我尝试了哈希表的平等方法,但没有奏效

我应该使用foreach检查所有项目吗?

谢谢


Hallo in c# i got two hashtable object of which key/value pair is same and i want to check if that two hashtable key/value pairs are equal..

i tried up hashtable's equal method but not worked

should i check all items with foreach?

thanks


原文:https://stackoverflow.com/questions/4947304
更新时间:2023-10-28 20:10

最满意答案

这是因为变量httpRequest应该在getStates()函数之外定义。 否则processRequest()无法看到它。


It is because variable httpRequest should be defined outside getStates() function. Otherwise processRequest() cannot see it.

相关问答

更多
  • 这是因为变量httpRequest应该在getStates()函数之外定义。 否则processRequest()无法看到它。 It is because variable httpRequest should be defined outside getStates() function. Otherwise processRequest() cannot see it.
  • 你的AJAX是发布的,但你没有设置POST路由,只有GET。 添加一条POST路线,如下所示: Route::post('home', "MyController@home"); Your AJAX is POSTing, but you have no POST route set, only GET. Add a POST route, like so: Route::post('home', "MyController@home");
  • 你尝试将你的ajax类型更改为POST吗? $.ajax({ url: '{{ URL::to("yourURL") }}', type:'POST', data:"cid="+$(this).val()+"&_token=" + $("input[name=_token]").val(), dataType:'JSON', success:function(result){ }, ...
  • 尝试使用renderText()而不是render() : public static void doIt(String input) { String out = input + "_foo"; renderText(out); } 如果您的视图(编写脚本的地方)不属于YourController,请尝试显式定义您使用的控制器: $(document).ready(function() { // when I click a button ... $("#send").click ...
  • 本来要写评论,但这会更清楚: .to_json 你试过.to_json吗? 这个答案似乎非常接受这个想法: render json: params.to_json 如果不这样做,您是否考虑过只测试静态文本: render "hello".to_json ? 调节器 您确定要将正确的数据/参数发送到您的控制器吗? 一些好的反馈将是您的请求日志 Was going to write a comment, but this will be clearer: .to_json Have you tried .t ...
  • 首先,当您使用JQuery ajax提交表单时,无需为链接设置值 Html::a('click me', ['#'],['id' => 'perform']); 使用此ID您可以按如下方式提交请求 $this->registerJs("$('#perform').click(function(event){ event.preventDefault(); // to avoid default click event of anchor tag $.ajax({ url: '".yii\hel ...
  • 当使用contentType: 'application/json' ,您需要将数据作为JSON字符串发送,以便模型联编程序可以映射它。 您应该通过POST方法发送复杂的数据,而不是GET。 GET方法适用于发送少量属性的小平坦视图模型。 这些将作为查询字符串通过$.ajax方法发送。 在你的情况下,你的数据不是一个平坦的视图模型。 所以你应该使用POST作为方法,以便$.ajax将发送请求正文中的数据。 我还建议您使用Url.Action帮助程序方法为action方法生成正确的相对url。 var url ...
  • 尝试这个: 第1步:在Controller的构造函数中创建BASE_URL public function __construct() { if (!defined('BASE_URL')) define('BASE_URL', url('/') . '/'); } 第2步:定义路线 Route::post('category', 'CategoryController@postCategory'); 第3步:将“BASE_URL”添加到HTML并在Script中实现。