vb.net中的类 [英] classes in vb.net

查看:118
本文介绍了vb.net中的类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,
我已经创建了一个程序来使用用户名和密码登录用户...但是该程序给出错误无法索引class(classname),因为它具有b = no default属性" ...如何克服此错误...请引导我
问候
badri

hello,
i hav created a program to login user using his username and password...but the program gives the error "class(classname) cannot be indexed because it has b=no default property"...how to overcome this error...plz guide me
regards
badri

推荐答案

好,您的第一步是向我们展示您的代码,以便我们了解发生了什么.要么学会使用
Well, your first step is to show us your code so we can understand what''s going on. Either that or learn to use google[^]


您忘了使用New关键字实例化您的类.

如果您的班级是clsMain,则将其实例化为

clsMain obj =新的clsMain();

希望这对您有帮助.:)
You forgot to instantiate your class using New keyword.

If your class is clsMain then instantiate it as

clsMain obj =new clsMain();

Hope this may help u.. :)


这篇关于vb.net中的类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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