當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。