In C #, the two question marks are used to determine ?? Is the object on the left null? If not null ?? The object on the left. If it is null, use ?? Object on the right.
For example, a = B ?? C. If B is null, A = C. If B is not null, A = B.
The
no suspense, straight to the point:The role of two question marks in C # is to judge?? Is the object on the left null, and if it is not NULL then use?? The object on the left, if NULL, is used?? The object on the right.For example: a = b?? C, if B
WeAbout closures, a old monk talk of the topic, JS closure I will be more, and very detailed, I will not say, you can look at the previous article;Let's compare the closures in C # and the closure in JS;Look at our C # code first;
Prototype source code analysis String (4) supplement. For more information, see.
Replace
Interpolate|Sub|Scan|Truncate | gsub
Interpolate: regards a string as a template and fills it with the object attributes.
Sub: replacement is
Differences between new and override in C #Recently, I briefly reviewed the keywords that need to be used to inherit this feature in C #. Some of the key points are specially sorted out for your convenience. This problem was also mentioned in a
Editor: Today to share a JS implementation of similar C # format method. The formatted output of the string is helpful to the string conversion and formatting display.
Body:
Directly on the code:
The code is as follows
Copy Code
Replace
Interpolate|Sub|Scan|Truncate | gsub
Interpolate: regards a string as a template and fills it with the object attributes.
Sub: replacement is used to replace the substring specified before the string that matches the pattern
Replace
Interpolate | sub | scan | truncate | gsub
Interpolate: regards a string as a template and fills it with the object attributes.Sub: replacement is used to replace the substring specified before the string that matches the pattern
Recently I briefly review the following in C # to inherit this feature, the need to use the keyword, which has some key points, specially sorted out, convenient for everyone to check. This issue was also mentioned in a written and interview session
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.