当前位置: 首页>>代码示例>>C#>>正文


C# Item.ToString方法代码示例

本文整理汇总了C#中System.Item.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# Item.ToString方法的具体用法?C# Item.ToString怎么用?C# Item.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Item的用法示例。


在下文中一共展示了Item.ToString方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: PrintAction

 void PrintAction(Item item)
 {
     System.Console.WriteLine("Performing action on " + item.ToString());
 }
开发者ID:iq110,项目名称:csharpgameprogramming,代码行数:4,代码来源:Program.cs

示例2: RunItem

 // ----------------------------------------------------------------------------
 // Processes the given Item.
 // ----------------------------------------------------------------------------
 private StarTeam.Item RunItem(Server stServer, Project stProject, StarTeam.View stView, Item.Type stType, Folder stFolder, Item stItem)
 {
     StarTeam.Item item = null;
     File temp = (File)stItem;
     if (temp.Name == "revision.txt")
         item = stItem;
     if (stItem.ToString() == "revision.txt")
         item = stItem;
     return item;
 }
开发者ID:RichardRanft,项目名称:RevEdit,代码行数:13,代码来源:StarTeamServices.cs

示例3: refreshData

        public static void refreshData()
        {
            items.Clear();
            int index = 0;
            try
            {
                SqlCommand cmd = new SqlCommand("SELECT * FROM dbo.IV00101 ORDER BY ITEMNMBR", connection);
                SqlDataReader reader = null;
                reader = cmd.ExecuteReader();
                while (reader.Read())
                {
                    Item i = new Item();
                    i.itemcode = reader["ITEMNMBR"].ToString().Trim();
                    i.itemname = reader["ITEMDESC"].ToString().Trim();
                    i.pricegroup = reader["PriceGroup"].ToString().Trim();
                    string temp = reader["STNDCOST"].ToString();
                    i.cost = Convert.ToDouble(temp);
                    items.Add(i);
                    table.Add(i.ToString(), index);
                    index++;

                }
                reader.Close();
            }
            catch (Exception e)
            {
                Console.WriteLine("Oops! " + e.ToString());
            }

            try
            {
                SqlCommand cmd2 = new SqlCommand("SELECT * FROM dbo.IV00108 WHERE PRCLEVEL = 'RETAIL' ORDER BY ITEMNMBR", connection);
                SqlDataReader reader2 = null;
                reader2 = cmd2.ExecuteReader();

                while (reader2.Read())
                {
                    Price p = new Price();
                    String tempItemNumber = "";
                    tempItemNumber = reader2["ITEMNMBR"].ToString().Trim();
                    p.uofm = reader2["UOFM"].ToString().Trim();
                    p.Toqty = Convert.ToDouble(reader2["TOQTY"].ToString().Trim());
                    p.Fromqty = Convert.ToDouble(reader2["FROMQTY"].ToString().Trim());
                    p.Uomprice = Convert.ToDouble(reader2["UOMPRICE"].ToString().Trim());
                    p.Qtybsoum = Convert.ToDouble(reader2["QTYBSUOM"].ToString().Trim());
                    Item found = items.Find(delegate(Item it) { return it.itemcode.Equals(tempItemNumber); });
                    found.priceList.prices.Add(p);

                }
                reader2.Close();
            }
            catch (Exception e)
            {
                Console.WriteLine("Oops! " + e.ToString());
            }
        }
开发者ID:orette,项目名称:southville,代码行数:56,代码来源:GPData.cs

示例4: FindItem

 private StarTeam.Item FindItem(Server stServer, Project stProject, StarTeam.View stView, Item.Type stType, Folder stFolder, Item stItem, String fileName)
 {
     StarTeam.Item item = null;
     File temp = (File)stItem;
     if (temp.Name == fileName)
         item = stItem;
     if (stItem.ToString() == fileName)
         item = stItem;
     return item;
 }
开发者ID:RichardRanft,项目名称:RevEdit,代码行数:10,代码来源:StarTeamServices.cs


注:本文中的System.Item.ToString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。