官术网_书友最值得收藏!

What's with the dots?

When you look at code written by others, you'll see words with periods separating them. What the heck is that? It looks complicated, doesn't it? The following is an example from the Unity documentation:

transform.position.x 

Don't concern yourself with what the preceding code means, as that comes later. I just want you to see the dots.

This is called dot syntax. The following is another example. It's the fictitious address of my house: UnitedKingdom, Bedfordshire, Sandy, 10MyStreet. Looks funny, doesn't it? That's because I used the syntax (grammar) of C# instead of the post office. However, I'll bet that if you look closely, you can easily figure out how to find my house. We'll get into much more at a later stage. For now, think of dot syntax as an address, starting from a big thing, a country in this case, and narrowing down to the most precise part that we want to access.

主站蜘蛛池模板: 达日县| 彭山县| 腾冲县| 唐海县| 丁青县| 黑龙江省| 长兴县| 油尖旺区| 金门县| 阿巴嘎旗| 崇左市| 五家渠市| 枣阳市| 宁强县| 江安县| 昌都县| 精河县| 辛集市| 永修县| 南城县| 潢川县| 梁河县| 凉山| 电白县| 南溪县| 揭阳市| 大渡口区| 三穗县| 楚雄市| 榆树市| 满城县| 合水县| 佛冈县| 元江| 巨野县| 陆河县| 西藏| 岳阳市| 东丽区| 阳山县| 桃园县|