当前位置:网站首页>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.
边栏推荐
- 产品力进阶新作,全新第三代荣威RX5盲订开启
- [bitbear story collection] February MVP hero story open source with love
- 2022年安全员-B证理论题库及模拟考试
- 商品热销排行【项目 商城】
- mysql——find_in_set用法
- Cloudcompare source code analysis: read ply file
- Fonctionnement de la plate - forme d'examen de simulation pour les agents de sécurité - Questions d'examen de certificat a en 2022
- 2022年安全员-A证考题模拟考试平台操作
- Unity3d C#开发微信小游戏音频/音效播放问题解决过程分享
- mysql5和mysql8同时安装
猜你喜欢

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

Are you still struggling with the gold content of PMP

Jetpack architecture component learning (3) -- activity results API usage

Simulated examination question bank and simulated examination of 2022 crane driver (limited to bridge crane)
![[bitbear story collection] February MVP hero story open source with love](/img/ee/79556cacf61e41e339296ff0adc53d.jpg)
[bitbear story collection] February MVP hero story open source with love

Wireless communication comparison of si4463, si4438 and Si4432 schemes of wireless data transmission module

2022高压电工考试题模拟考试题库及在线模拟考试

2022年安全员-B证理论题库及模拟考试

【Day13-14 文献精读】Cross-dimensional magnitude interactions arise from memory interference

2022 safety officer-b certificate theoretical question bank and simulation test
随机推荐
Introduction to Solr Basics
产品力进阶新作,全新第三代荣威RX5盲订开启
Research Report on development trend and competitive strategy of global non directional beacon industry
RF中使用reuqests的两种方式
mysql5和mysql8同时安装
Application of Lora technology in long distance wireless transmission of water meter reading
2022年安全员-A证考题模拟考试平台操作
Fonctionnement de la plate - forme d'examen de simulation pour les agents de sécurité - Questions d'examen de certificat a en 2022
华为云、OBS、
2022 R1 quick opening pressure vessel operation test questions and online simulation test
postgresql10 进程
SecurityContextHolder. getContext(). getAuthentication(). Getprincipal() gets username instead of userdetails
【Day3 文献精读】Asymmetrical time and space interference in Tau and Kappa effects
[naturallanguageprocessing] [multimodal] albef: visual language representation learning based on momentum distillation
帝国理工等最新《胶囊网络综述》论文,29页pdf阐述胶囊的概念、方法与应用
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
C language simple exercise No.17, about the combination of for and while loops
双向带头循环链表(C语言)
[Day10 literature extensive reading] temporary cognition can affect spatial cognition more than vice versa: the effect of
Small program startup performance optimization practice