In addition to Weibo, there is also WeChat
Please pay attention

WeChat public account
Shulou
 
            
                     
                
2025-11-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
In this article Xiaobian for you to introduce in detail "C# sizeof operator and ternary operator how to use", detailed content, clear steps, details handled properly, I hope that this "C# sizeof operator and ternary operator how to use" article can help you solve doubts, the following follow the editor's ideas slowly in-depth, together to learn new knowledge.
Example
Using System
Namespace OperatorsAppl
{
Class Program
{
Static void Main (string [] args)
{
Instance of / * sizeof operator * /
Console.WriteLine ("size of int is {0}", sizeof (int))
Console.WriteLine ("size of short is {0}", sizeof (short))
Console.WriteLine ("size of double is {0}", sizeof (double))
/ * instance of ternary operator * /
Int a, b
A = 10
B = (a = = 1)? 20: 30
Console.WriteLine (the value of "b is {0}", b)
B = (a = = 10)? 20: 30
Console.WriteLine (the value of "b is {0}", b)
Console.ReadLine ()
}
}
}
When the above code is compiled and executed, it produces the following results:
The size of int is the size of 4short is the size of 2double is the value of 8b is the value of 30b is 20 read here, this "C# sizeof operator and ternary operator how to use" the article has been introduced, want to master the knowledge of this article also need to practice and use in order to understand, if you want to know more about the content of the article, welcome to pay attention to the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about

The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r


A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from

Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope





 
             
            About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.