Skip to main content

c# list multiple data types

 public class New_Library
        {

            public string File_Name { get; private set; }
            public string File_Full_Path { get; private set; }
            public string checksum { get; private set; }


            public New_Library(string File_Name1, string File_Full_Path1, string checksum1)
            {
                File_Name = File_Name1;
                File_Full_Path = File_Full_Path1;
                checksum = checksum1;
            }
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            List<New_Library> list_New_Library = new List<New_Library>();
            list_New_Library.Add(new New_Library("sometext", "Vishal", "123456")); // store text
            list_New_Library.Add(new New_Library("sometext1", "Vishal1", "1234561")); // store text

            // read values from List
            foreach (New_Library slot in list_New_Library)
            {
                string File_Name = Convert.ToString(slot.File_Name);
                string File_Full_Path = Convert.ToString(slot.File_Full_Path);
                string checksum = Convert.ToString(slot.checksum);
            }
        }

Comments

Popular posts from this blog

Editing Child GridView in Nested GridView

Editing Child GridView in Nested GridView In this article we will explore how to edit child gridview in the nested gridview.   Let''s write some code. Step 1:  Add scriptmanager in the aspx page. < asp : ScriptManager   ID ="ScriptManager1"   runat ="server"   EnablePageMethods ="true"> </ asp : ScriptManager > Step 2:  Add below stylesheet for modal popup. < style   type ="text/css">        .modalBackground        {              background-color : Gray;              filter : alpha(opacity=80);              opacity : 0.5;       }        .ModalWindow        {     ...

JQuery lightbox image slideshow gallery in asp.net

Introduction: In this article I will explain how to create lightbox image slideshow in asp.net using JQuery. Description:  In previous post I explained about  Ajax SlideshowExtender sample  to display images slideshow. Now in this article I will explain how to create lightbox image slideshow in asp.net using JQuery. In many websites generally we will see different types of slideshows like whenever we click on image that is automatically open with lightbox effect and we have a chance to see all the remaining images by press next or previous options in slideshow. All these Slideshows are implemented by using JQuery plugins. After seen those slideshows I decided to write post to use JQuery plugins to implement beautiful slideshown in asp.net.  To implement this one I am using  previous post  insert and display images from folder based on imagepath in database  because in that post I explained clearly how to insert images into our project folder a...

Print ASP.Net GridView with page breaks and repeat header on each page

GridView Markup I have a simple ASP.Net GridView with a button to print the GridView contents as shown below < asp : GridView   ID ="GridView1"   runat ="server"   AutoGenerateColumns ="false"   Font-Names ="Arial"      Font-Size ="11pt"   AlternatingRowStyle-BackColor ="#C2D69B"   HeaderStyle-BackColor ="green"      AllowPaging ="false">      < Columns >          < asp : BoundField   ItemStyle-Width ="150px"   DataField ="CustomerID"   HeaderText ="CustomerID"   />          < asp : BoundField   ItemStyle-Width ="150px"   DataField ="City"   HeaderText ="City"   />          < asp : BoundField   ItemStyle-Width ="150px"   DataField ="PostalCode"   HeaderText ="PostalCode"   /...