Upgrade to Pro — share decks privately, control downloads, hide ads and more …

「var禁止」禁止

 「var禁止」禁止

2016/02/20 Hokuriku Comm CampのLTで発表した際のプレゼンテーションスライドです。

RyotaMurohoshi

February 20, 2016
Tweet

More Decks by RyotaMurohoshi

Other Decks in Technology

Transcript

  1. varɺ୹͔͚ͯ͘ૉఢ΍Μʂ // ΞϗΈ͍ͨʹ௕͍ܕ໊(ۃ୺)Λ2ճॻ͘ʂʁ Dictionary<HogeFuga, List<PiyoPiyoPiyo>> dictionary = new Dictionary<HogeFuga, List<PiyoPiyoPiyo>>();

    // 1ճॻ͚͹͍͍ΑͶ var dictionary = new Dictionary<HogeFuga, List<PiyoPiyoPiyo>>(); Θ͟Θ͟ಉ͜͡ͱɺ2ճॻ͘ඞཁͳ͍ΑͶ
  2. (Զ͕ࢥ͏)#varͷྑ͍ར༻ྫ // =ͷӈล͕Ϧςϥϧ var level = 27; var name =

    "Ryota"; // =ͷӈล͕ίϯετϥΫλ or ϑΝΫτϦϝιου var playerData = new PlayerData(level, name); // =ͷӈล͕δΣωϦοΫϝιουͰܕҾ਺͕ฦΓ஋ܕͳ // ϝδϟʔͳϝιου(࣍ͷ͸UnityͰྑ͘࢖͏΍ͭ) var player = FindObjectOfType<Player>();
  3. JavaͷίʔυͰ͢ // Լهͷॻ͖ํ͸ྑ͘ͳ͍ ArrayList<String> list = new ArrayList<String>(); // Լهͷॻ͖ํΛ͢΂͖

    List<String> list = new ArrayList<String>(); // μΠϠϞϯυԋࢉࢠͰ୹͔͚͘Δ List<String> list = new ArrayList<>();