当前位置:网站首页>C collection of questions for project review
C collection of questions for project review
2022-06-11 23:17:00 【china_ zyb】
Baidu SkyDrive : link : https://pan.baidu.com/s/1SAsX_ITj44q1YACE77Ys-A Extraction code : 2fhx
- first line using System What does that mean? ?
answer :using system; stay C# Refers to the meaning of namespace , Introducing a namespace is equivalent to Java Inside import java.util The role of the introduction package , Introduce namespace , You can use the variable names and functions .
For example, use StringBuilder class , You don't have to System.Text.StringBuilder builder = new System.Text.StringBuilder() 了 .
- namespace And what does that mean ?
answer : Namespace , amount to namespace amount to windows Folders in the operating system .“ Project name . Folder name ”, Used to subdivide files .
- Public And private Differences and functions of
answer :private It's completely private , It can only be called in the class itself , You can't call... Outside of a class or a subclass , A child class cannot inherit the parent class's private Properties and methods of .
public Fully open to all classes and members , Unlimited access .
- @ The role of symbols
answer :1. Ignore escape characters ,2. Make string cross line ,3. Usage in identifier :C# Is keyword not allowed as identifier ( Class name 、 Variable name 、 Method name 、 Tablespace name, etc ) The use of , But if you add @ After that .
- Explain it. delete Error reporting mechanism in methods , Operation process
answer :1、 Include code that anticipates that an exception might be thrown in try In the block .
2、 If something goes wrong , Then transfer in catch Implementation .
3、finally There can be no , There can be only one . Whether there is any abnormality or not , It will always run at the end of this exception handling structure . Even if you are in try In block return Back to , Before returning ,finally Always execute , This gives you the opportunity to do some cleanup at the end of exception handling . Such as closing database connection, etc .( without catch Sentence block , that finally Block is necessary .)
- Explain the placeholders {0}
answer : Receive the first parameter passed
- Explain what's in the parameter list box
answer : Declare a variable or class , Receive parameters from interface
- Explain it. sql sentence
answer : Inquire about x In the table a,b Column
- Datatable What is it? ?
answer :DataTable It is a grid virtual table that temporarily saves data ( A table representing data in memory .), Store the data queried from the database .
- String.format Explain it.
answer :string.format() Format specifiers , Specifies the String Each format item in the data of type is replaced by a text equivalent of the value of the corresponding object .
- Return Role in method
answer : Role in methods with return values :return Followed by return value , The return value type should be the same as the method return value type , Such as “public int intt()” Method return value type of is Int, be return The return value type followed must also be int.Return Assign return value to method , You can call values directly from the method. .
The function in the method without return value : End method run .
- return DBhelper.query(sql).Rows.Count; Explain it.
answer :return take DBHelper.query(sql) in DataTable The total number of rows of type data is returned to type Int Methods .
- public partial class Form1 : Form What does that mean? ?
answer : forms Form1 In the inheritance system Form Form format for .
- private void btnSubmit_Click(object sender, EventArgs e) Explain it. () Inside
answer : system parameter
- This What is it? ?
answer : This form
- this.Close(); Explain it.
answer : Close this form
- private void StuChargeForm_Load(object sender, EventArgs e) Explain what happened
answer : Form load event , Occurs before the form is first displayed .
- DataSource What does it mean ?
answer : data source
- public void flush() void What does it mean ?
answer :void Indicates that the method does not return a value .
- Static What does it mean ? What's the role ?
answer : Static modifier , In the method ( function ) Pre use static modification , Indicates that this method is owned by the same class or by the same custom class , Not the instance of this class . Static methods can be called directly through classes , But you can't call a static method through an instance of this class , Because when calling static methods through entity classes , Object may not exist . Static methods cannot be overridden , Can only be overloaded , Because a static method does not belong to an instance object of a class .
- InitializeComponent(); What's the role 、?
answer : Initialize form control
- if (this.cboFlag.Text == " on-the-job ") t.flag = "1";
else if (this.cboFlag.Text == " quit ") t.flag = "2";
else if (this.cboFlag.Text == " vacation ") t.flag = "3"; Explain it. if Operation process of judgment
answer : A little
- this.lblPage.Text = " At present :" + page.nowPage + " page common :" + page.getTotalPage() + " page A total of :" + page.count + " strip "; Medium + What does it mean ?
answer : Displays the current page and total number of pages in the page
- this.cboFlag.Text = " on-the-job "; cboFlag What controls are ?
answer : A drop-down box
- dgvTeacher.SelectedRows[0].Cells["teachid"].Value.ToString() Explain the line
answer :dgv In the first row of the selected row teachid Value in column converted to character creation type
- = And == The difference between
answer := It's assignment ,== Is a judgment
- int.Parse What are you doing ?
answer : take () The value in is replaced by int type
- this.cboTeacher.Items.Add(" All "); What are you doing ?
answer : Propagation to this form teacher Add an item to the options in the drop-down box ‘ All ’
- dt.Rows[0]["stuname"].ToString(); Explain the line
answer : hold dtz In the first line of stuname Change the value of column to character creation
- left join And inner join And right join What's the difference? ?
answer :left join( Left join ) Returns records that include all records in the left table and join fields in the right table ;
inner join( Equivalent connection ) Only rows with equal join fields in two tables are returned ;
right join( Right link ) Returns records that include all records in the right table and join fields in the left table .
- d.dormNum like '%{6}%' Explain it. %- wildcard
answer : Fuzzy query {6} Indicates the seventh parameter received ,%- Replace one or more characters .
- limit {0},{1} Explain the placeholders 0 and 1 The role of
answer :{0} Indicates which data to display from ,{1} Indicates how many pieces of data are displayed per page
- Let's talk about some aggregate functions
answer :max,min,count,avg,sum
- Eight basic types
answer byte,short,int,long,float,double,bool,char
- Explain separately Sql Statement and and or
answer : A little
- Priority with or without
Not > And > or
- Displaymember and valuemember The meaning of
answer :displaymember Fields to be displayed for binding ,valuemember Binding correspondence displaymember Value . Similar to key value pair .
- Why do I need to close the form new A new object
answer : Because of the creation of Factory class , All forms are from Factory Invocation in class , And Factory All forms in the class are static , Ensure the uniqueness of the form . When the form is closed ,Factory The value of the form instance object in class becomes Null, Next time from Factory When a form is called in a class , Will pop up Error, So when the form is closed , want new A new form is reserved for instance objects .
- if (i == j) () What is returned in ?
answer :true||false
- this.dgvstudent.SelectedRows.Count What is this ?
answer : How many lines are there
- Student s = new Student(); Why new A new object
answer : It is used to save the data entered by the user on the interface or to receive the data queried by the database .
- Delete requires call DBhelper Which method in , Why? ?
answer : Non query method , The non query method is responsible for connecting the non query statements to the database
- Why use +=? What does it do ?
answer : Give Way = The left value plus the right value is assigned to = The value on the left , Total charge amount
- if (this.rdoStudent.Checked) What will be returned ?
answer :true||false
- Page++ Medium ++ What does that mean? ?
answer : Increasing 1
- Mdiparent What's the role ?
answer : Set the parent form of the form
- Application.Exit() And this.close What's the difference? ?
answer :Application.Exit() Close all application windows , Terminate program operation ;Form.Close Method to close the form .
- Order by And group by The difference between ?Asc and desc The difference between ?
answer :groud by It has the function of sub combination and parallel . take groud by The following columns are grouped into one row according to the same row value , Carry out statistical work of the same data , Generally used in combination with aggregate functions .
Order by It has the function of sorting by conditions .Asc It's a positive order ,order by Positive sort by default ,desc For reverse order .
group by Than order by Execute first ,order by It won't be right group by Sort internally , If group by Only one record after , that order by Will be invalid .
- Textchanged What is it for ?
answer : Event when text changes
- Indexof What are you doing ? Back to what ?
answer : Returns the first occurrence of a specified string value in a string . If no characters are specified in the string , Then return to -1; If there is , Returns the position of the string .Indexof You can start the query from the specified location ,formindex The legal value range of 0 To stringobject.length-1.
边栏推荐
- C# List. Can foreach temporarily / at any time terminate a loop?
- A method of relay for ultra long distance wireless transmission of low power wireless module
- Three years of college should be like this
- Application of Lora wireless communication module Lora technology in smart home light control
- 唤醒手腕 - 神经网络与深度学习(Tensorflow应用)更新中
- Altium designer工程下多个原理图和PCB图的一一对应
- JS to add an attribute to an array object
- Small program startup performance optimization practice
- 华为云、OBS、
- 产品力进阶新作,全新第三代荣威RX5盲订开启
猜你喜欢

Why can't Google search page infinite?

Huawei cloud, OBS

Leetcode must review 20 lintcode (5466421166978227)

【Day15 文献泛读】Numerical magnitude affects temporal memories but not time encoding

小程序启动性能优化实践

2022 safety officer-a certificate test question simulation test platform operation

移印工艺流程及应用注意事项

Games-101 闫令琪 5-6讲 光栅化处理 (笔记整理)

Small program startup performance optimization practice
![[day6-7 intensive literature reading] a unifying Bayesian framework accounting for spatiotemporal interactions with a](/img/a9/c0f3a6b76d789d47172727d353d9be.png)
[day6-7 intensive literature reading] a unifying Bayesian framework accounting for spatiotemporal interactions with a
随机推荐
Google搜索为什么不能无限分页?
Games-101 闫令琪 5-6讲 光栅化处理 (笔记整理)
H. 265 introduction to coding principles
RF中使用reuqests的两种方式
2022 safety officer-b certificate theoretical question bank and simulation test
Is it too troublesome to turn pages manually when you encounter a form? I'll teach you to write a script that shows all the data on one page
[day11-12 intensive literature reading] on languages in memory: an internal clock account of space-time interaction
Research Report on development trend and competitive strategy of global reverse osmosis membrane cleaning agent industry
关于腾讯域名解析阿里云服务器的一些坑
A new product with advanced product power, the new third generation Roewe rx5 blind subscription is opened
Small program startup performance optimization practice
A method of relay for ultra long distance wireless transmission of low power wireless module
How to construct PostgreSQL error codes
2022安全员-C证判断题模拟考试平台操作
Unity3d C#开发微信小游戏音频/音效播放问题解决过程分享
The second bullet of in-depth dialogue with the container service ack distribution: how to build a hybrid cloud unified network plane with the help of hybridnet
Introduction to Solr Basics
C language simple exercise No.17, about the combination of for and while loops
Method for WiFi wireless transmission module to access cloud platform using esp8266 chip scheme
[day1/5 literature intensive reading] speed constancy or only slowness: what drives the kappa effect