Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections.Generic;
- using System;
- public class DictionaryExample
- {
- [Serializable]
- public class MyCustomClass
- {
- public float a;
- public float b;
- }
- public Dictionary<MyCustomClass, List<float>> dict;
- public void SomeMethod ()
- {
- dict = new Dictionary<MyCustomClass, List<float>> ();
- dict.Add (
- new MyCustomClass ()
- {
- a = 1, b = 2
- },
- new List<float> ()
- {
- 10,
- 20,
- 30,
- 40,
- 50
- });
- MyCustomClass key = new MyCustomClass () { a = 1, b = 2 };
- List<float> NeededValue = null;
- dict.TryGetValue (key, out NeededValue);
- // NeededValue = null; How avoid this ????
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement