欢迎来到天天文库
浏览记录
ID:61462210
大小:218.52 KB
页数:7页
时间:2021-02-02
《VBNET第十章实验报告.docx》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、VB.NET第十章实验报告姓名:蒋一一班级:计算机(中澳)122班学号:一、源程序代码10.2调试10.2.1创建示例项目---创建一个用于调试的简单示例项目ImportsSystem.Collections.GenericPublicClassDebugPrivateobjStringValuesAsNewGenerics(OfString)PrivateobjIntegerValuesAsNewGenerics(OfInteger)PrivateobjCustomerListAsNewList(OfCusto
2、mer)PrivateSubListCustomer(ByValcustomerToListAsCustomer)lstData.Items.Add(customerToList.CustomerID&"-"&customerToList.CustomerName)EndSubPrivateSubbtnStart_Click(ByValsenderAsSystem.Object,ByValeAsSystem.EventArgs)HandlesbtnStart.ClickDimstrDataAsStringlstD
3、ata.Items.Add("Stringvariabledata:")IfstrData.Length>0ThenlstData.Items.Add(strData)EndIflstData.Items.Add(String.Empty)lstData.Items.Add("CustomerintheCustomerClass:")objCustomerList.Add(NewCustomer(1001,"HenryFor"))objCustomerList.Add(NewCustomer(1002,"Orvi
4、lleWright"))ForEachobjCustomerAsCustomerInobjCustomerListListCustomer(objCustomer)NextlstData.Items.Add(String.Empty)lstData.Items.Add("GenericsClassKey/ValuePairsusingStringValues:")objStringValues.Add("1001","HenryFord")lstData.Items.Add(objStringValues.Key
5、(0)&"="&objStringValues.Value(0))lstData.Items.Add(String.Empty)lstData.Items.Add("ComputerClassProperties:")UsingobjMemoryAsNewComputerlstData.Items.Add("FreeMemory="&objMemory.FreeMemory)lstData.Items.Add("TotalMemory="&objMemory.TotalMemory)EndUsinglstData
6、.Items.Add(String.Empty)DimstrPasswordAsString="POpPassword"DimstrLowerCaseLettersAsString=String.EmptyForintIndexAsInteger=0TostrPassword.Length-1IfNotstrPassword.Substring(intIndex,1)Like"[a-z]"ThenContinueForEndIfstrLowerCaseLetters&=strPassword.Substring(
7、intIndex,1)NextlstData.Items.Add("Passwordlowercasecharacters:")lstData.Items.Add(strLowerCaseLetters)EndSubEndClass使用ExceptionAssistantImportsSystem.Collections.GenericPublicClassDebugPrivateobjStringValuesAsNewGenerics(OfString)PrivateobjIntegerValuesAsNewG
8、enerics(OfInteger)PrivateobjCustomerListAsNewList(OfCustomer)PrivateSubListCustomer(ByValcustomerToListAsCustomer)lstData.Items.Add(customerToList.CustomerID&"-"&customerToList.CustomerNa
此文档下载收益归作者所有