本文整理汇总了C#中DataReader.GetInt16方法的典型用法代码示例。如果您正苦于以下问题:C# DataReader.GetInt16方法的具体用法?C# DataReader.GetInt16怎么用?C# DataReader.GetInt16使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataReader
的用法示例。
在下文中一共展示了DataReader.GetInt16方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadFromDB
public void LoadFromDB(DataReader reader)
{
Items.Clear();
while (reader.Read())
{
Int32 characterNo = reader.GetInt32(0);
Int32 characterId = reader.GetInt32(1);
Character ch = new Character(_user, characterId, characterNo);
ch.Level = reader.GetInt16(2);
ch.Exp = reader.GetInt32(3);
ch.GradeId = reader.GetInt16(4);
ch.PromotionId = reader.GetInt16(5);
Items.Add(ch);
}
}
示例2: LoadFromDB
public void LoadFromDB(DataReader reader)
{
Decks.ForEach(v => v.Clear());
while (reader.Read())
{
DeckType deckType = (DeckType)reader.GetInt32(0);
Int32 slotNo = reader.GetInt16(1);
Int32 characterNo = reader.GetInt32(2);
this[deckType].Characters[slotNo] = _user.InvenCharacter.Find(characterNo);
}
}
示例3: LoadFromDB
public void LoadFromDB(DataReader reader)
{
Items.Clear();
while (reader.Read())
{
Int32 itemNo = reader.GetInt32(0);
Int32 itemId = reader.GetInt32(1);
Item ch = new Item(_user, itemId, itemNo);
ch.PromotionId = reader.GetInt16(2);
ch.Quantity = reader.GetInt32(3);
Items.Add(ch);
}
}
示例4: LoadFromDB
public void LoadFromDB(DataReader reader)
{
Items.Clear();
while (reader.Read())
{
Int32 resourceId = reader.GetInt16(0);
Int32 point = reader.GetInt32(1);
Items.Add(new Data(resourceId, point));
}
}