LoginSignup
0
0

More than 5 years have passed since last update.

elfsharp > sectionIndicesByName.TryGetValue() > Dictionary使用

Last updated at Posted at 2015-08-21

http://qiita.com/7of9/items/6dcc521c648598f3ab23
で出てきたsectionIndicesByName.TryGetValue(name, out index)の実装を探したが、出てきたのは以下のものだった。

link: ELF.cs

ELF.cs
            if(HasSectionsStringTable)
245             {
246                 sectionIndicesByName = new Dictionary<string, int>();
247             }
248             for(var i = 0; i < sectionHeaderEntryCount; i++)
 
252                 if(HasSectionsStringTable)
253                 {
254                     var name = header.Name;
255                     if(!sectionIndicesByName.ContainsKey(name))

つまりは sectionIndicesByName.TryGetValue()というのはDictionary()の名前検索によりインデックスを取得している。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0