An Error That I have Recently Completed

An Error That I have  Recently Completed

编写C#应用程序时,用到了TextBox文本输入框。

当需要判断文本框输入是否为空时写成了if (textBox_id.Text.ToString() == Null)

应该用textBox_id.Text.ToString() == ""

Reason of the error

没有认清Null和""的区别。

Null指没有定义,内存没有分配空间

""是空字符串,系统分配了空间,但是字符串为空

Impact of the error

并程序不能正确判断出输入框输入为空。

即使输入框内没有任何输入,也没有执行输入框为空之后的操作而是判断为输入框有输入。

因为textBox_id.Text.ToString() == Null 一直为假。

How did I find it

程序failure。测试时没有输出预期结果。

时间: 2024-10-12 23:02:31

An Error That I have Recently Completed的相关文章

【软件测试】Homework 1 Briefly describe an error

[要求] Briefly describe an error from your past projects that you have recently completed or an error from other projects which impress you most. State the reason, impact of the error and how did you find it. [解答] 在上学期的考勤系统制作过程中,我们后台采用的是Spring Boot和Hib

软件工程项目第一次作业

I have recently completed a project which was the big job of visual course. As a homework, of course, it is non-routine. It need a plan to finish the homework before the deadline. The objective of this project is to finish the homework. I need to cre

软件测试技术 hw1

作业题目: Briefly describe an error from your past projects that you have recently completed or an error from other projects which impress you most. State the reason, impact of the error and how did you find it. 作业内容: 在项目开发过程中,我们使用git.oschina来共同开发.开始时一切顺

homework 1

If mentioned a recently completed software project, it had to be one of my course at the end of last term which is about web development. Because before I learning this course, I almost knew nothing about web development this aspect, I had lots of di

Software Testing -- Homework 1

Requirements:Briefly describe an error from your past projects that you have recently completed or an error from other projects which impress you most. State the reason, impact of the error and how did you find it. 1.错误及分析:之前在Hackerrank上做30 Days of C

SQLite Learning、SQL Query Optimization In Multiple Rule

catalog 1. SQLite简介 2. Sqlite安装 3. SQLite Programing 1. SQLite简介 SQLite是一款轻型的数据库,是遵守ACID的关系型数据库管理系统,它包含在一个相对小的C库中.它是D.RichardHipp建立的公有领域项目.它的设计目标是嵌入式的,而且目前已经在很多嵌入式产品中使用了它,它占用资源非常的低,在嵌入式设备中,可能只需要几百K的内存就够了.它能够支持Windows/Linux/Unix等等主流的操作系统,同时能够跟很多程序语言相结

(zhuan) Using the latest advancements in AI to predict stock market movements

Using the latest advancements in AI to predict stock market movements 2019-01-13 21:31:18 This blog is copied from: https://github.com/borisbanushev/stockpredictionai In this notebook I will create a complete process for predicting stock price moveme

Storm实验 -- 单词计数4

在上一次单词计数的基础上做如下改动: 使用 自定义  分组策略,将首字母相同的单词发送给同一个task计数 自定义 CustomStreamGrouping package com.zhch.v4; import backtype.storm.generated.GlobalStreamId; import backtype.storm.grouping.CustomStreamGrouping; import backtype.storm.task.WorkerTopologyContext;

storm学习笔记完整记录(一)

storm有两种运行模式(本地模式和集群模式) 1. 首先创建一个类似于HelloWorld的简单程序,以便进入storm的大门,包结构如下: 2.从包结构可以知道,这是一个Maven Project,pom.xml的内容如下: <project xmlns="http://maven.apache.org/POM/4.0.0"          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"