登录页面C#Var密码异常UnHandled [英] Login Page C# Var Password Exception UnHandled
本文介绍了登录页面C#Var密码异常UnHandled的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嘿,我正在编写一个登录论坛,然后它说Exception Unhandled
Hey I was coding a login forum and then it said Exception Unhandled
System.IndexOutOfRangeException:'索引超出了数组的范围。'
System.IndexOutOfRangeException: 'Index was outside the bounds of the array.'
我正在使用系统使用c#
I'm using c#
;使用System.Collections.Generic使用
; $
使用System.ComponentModel;
使用System.Data;
使用System.Drawing;
使用System .Linq;
$
使用System.Text;
使用System.Threading.Tasks;
使用System.Windows.Forms;
使用System.Threading;
使用System.IO;
使用System.Net;
使用静态System.Windows.Forms .VisualStyles.VisualStyleElement;
; $
使用System.ComponentModel;
使用System.Data;
使用System.Drawing;
使用System .Linq;
$
使用System.Text;
使用System.Threading.Tasks;
使用System.Windows.Forms;
使用System.Threading;
使用System.IO;
使用System.Net;
使用静态System.Windows.Forms .VisualStyles.VisualStyleElement;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Threading;
using System.IO;
using System.Net;
using static System.Windows.Forms.VisualStyles.VisualStyleElement;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Threading;
using System.IO;
using System.Net;
using static System.Windows.Forms.VisualStyles.VisualStyleElement;
推荐答案
您的问题存在一些问题。
There are some problems with your question.
- 你没有告诉我们哪一行得到例外。
- 没有"开始"。按钮在这里。
- 没有"登录"按钮按钮在这里。
- 你的代码不能按原样运行,因为我们缺少其他文件。
如果我不得不猜测,我猜你的用户数据库中有一行不包含"|",因此表达式"user.Split('|')[1]"失败群组。你最后可能有一个空行吗?
If I had to take a wild guess, I'd guess that there's a line in your user database that does not contain a "|", so that the expression "user.Split('|')[1]" fails. Do you possibly have a blank line at the end?
如果不是这样,那么你需要给我们更多的信息。
If that's not it, then you'll need to give us some more information.
这篇关于登录页面C#Var密码异常UnHandled的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文