Asp.net| question 1, about the difference between ref and out
The ref parameter needs to be initialized when it passes in
The out parameter does not need to be initialized when it is passed in, but it needs to be guaranteed to produce a valid reference
2, what's the difference between running on the heap and running on the stack?
class, large objects such as reference types are allocated on the heap, and value types are allocated on the stack, which is highly efficient. Each process has its own stack space, and C # automatically frees up the stack space when exiting the process. Heap is managed by the garbage collector
The difference between 3,frameset and IFRAME
Frameset is a framework in which a Web page is divided into several blocks, each of which is a different page file. An IFRAME is an inline web page that can be embedded anywhere on a page. General IFRAME use more flexible
The difference between 4,sprintf, wsprintf and printf
sprintf for printing ANSI character set
wsprintf for printing Unicode character sets
printf to the standard device output, which is the monitor stdout
The difference between 5,server.transfer and Response.Redirect
Server.Transfer: Redirects a user to another page using the server-side method.
In this scenario, the server simply transfers the context to another page. The advantage is that you can share page context information between pages. The disadvantage is that the user's browser is not aware of the transfer, so the browser's history is not updated. If the user refreshes this page, unexpected results may occur.
Response.Redirect: Redirects the user from the browser to another page.
In this scenario, a command is sent to the user's browser and the browser gets another page. The advantage is to update the history of the browser. The disadvantage is that this scenario performs additional round trips, which can affect performance.
The difference between 6,page.registerstartupscript and Response.Write
Page.registerclientscriptblock
The script will be placed close to the "</form>"
The front.
Page.registerstartupscript
The script will be placed immediately after the next few hidden input.
The difference between 7,class and struct
A struct is a value type, and class is a reference type.
All struct types are implicitly inherited from the class System.ValueType.
assigning to a struct type variable means that a "copy" of the assigned value will be created.
The default values for a struct are calculated as follows: Set all value type fields to their default values and set all reference type fields to null, which results in a default value for that structure.
Use boxing and unboxing operations to convert between a struct type and object.
For structs, this has a different meaning.
In structs, an instance field declaration cannot contain a variable initializer.
An instance constructor without arguments cannot be declared in a struct.
Destructors cannot be declared in structs.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.