Thursday, October 14, 2010

free c#,asp.net online books

following is the list of online websites which
contain online books,a lot of study material-

1.flazx.com
This website contains a big collection for books
on all topics related to programming or computers

2.IT Ebook
Similar to flazx.com itebookhome.com also contains
huge collection for books related to programming

3.usabooks.org
cotains books on IT Management, C , JavaScript/AJAX,
Web Designing, Graphic Designing, Networking, Database,
others

4.hagioteam.com
it contain online books on all the topics of programming.
Check yourself

Wednesday, July 21, 2010

ListView control example

I am giving the main codes below.If u need
the project with all coding then contact with me.

This program will add,delete user input to a listview box,
it also shows the currently selected employee name
in listview box.

using System;
using System.Collections.Generic;
using System.Text;

namespace MridulSamadder
{
    public enum DesignationType
    {
        SSE,
        SE,
        TeamLead
    }
   public class Employee
    {
        private string id;

        public string Id
        {
            get { return id; }
            set { id = value; }
        }
        private string name;

        public string Name
        {
            get { return name; }
            set { name = value; }
        }
        private string designation;

        public string Designation
        {
            get { return designation; }
            set { designation = value; }
        }
        private DateTime dateOfBirth;

        public DateTime DateOfBirth
        {
            get { return dateOfBirth; }
            set { dateOfBirth = value; }
        }
    }
}

using System;
using System.Collections.Generic;
using System.Windows.Forms;

namespace MridulSamadder
{
    static class Entry
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new EmployeeInformationUI());
        }
    }
}

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace MridulSamadder
{
    public partial class EmployeeInformationUI : Form
    {
        int globalListViewIndex;
        private List<Employee> employeeList = null;
        ListViewItem listviewItemObj = null;
        public EmployeeInformationUI()
        {
            employeeList = new List<Employee> ();
            InitializeComponent();
            FillComboWithData();          
        }

        private void addButton_Click(object sender, EventArgs e)
        {
            Employee employeeObj = new Employee();
            employeeObj.Name = nameTextBox.Text;
            employeeObj.Id = idTextBox.Text;
            employeeObj.Designation = designationComboBox.SelectedValue.ToString();
            employeeObj.DateOfBirth = Convert.ToDateTime(dateOfBirthDateTimePicker.Text);
            employeeList.Add(employeeObj);
            PopulateListView(employeeObj);
          
        }
        public void PopulateListView(Employee employeeObj)
        {                          
                    listviewItemObj = new ListViewItem(employeeObj.Id);
                    listviewItemObj.SubItems.Add(employeeObj.Name);
                    listviewItemObj.SubItems.Add(employeeObj.Designation);
                    listviewItemObj.SubItems.Add(employeeObj.DateOfBirth.ToString());
                    employeeInformationListView.Items.Add(listviewItemObj);
       
         }
        public void FillComboWithData()
        {
            designationComboBox.DataSource = Enum.GetNames(typeof(DesignationType));
        }

        private void deleteButton_Click(object sender, EventArgs e)
        {
            employeeInformationListView.Items.Remove(employeeInformationListView.Items[globalListViewIndex]);          
        }
     
        private void employeeInformationListView_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e)
        {
            globalListViewIndex = e.ItemIndex;          
        }     
        private void showButton_Click(object sender, EventArgs e)
        {
            string id = employeeInformationListView.Items[globalListViewIndex].Text;
            string name = employeeInformationListView.Items[globalListViewIndex].SubItems[1].Text;
            MessageBox.Show("Name Of The Employee:" + name);
        }

        private void EmployeeInformationUI_Load(object sender, EventArgs e)
        {

        }
    }
}

Wednesday, May 26, 2010

Download MS Windows Identity Foundation for free

This MS Identity Foundation helping simplified access
of users for developers via externalizing access of
users from the appilcation by decreasing development
effort and claims with built in security logic and
.Net tools(integrated).

user benefit are-
1.single sign on
2.collaboration across or in organizational boundaries
seamlessly.

download link & help-
msdn.microsoft.com/hi-in/evalcenter/dd440951.aspx

Thursday, December 10, 2009

using bulit in codes for class properties,methods,comments

here i am going to identify some techniques which are built in visual studio.
you will find that from internet,books but i am discussing it for good programming
practice.


visual studio contains pre written codes for class properties & methods
so you can use for ease of programming.suppose we need to define properties
for the private members of class.we can do it via visual studio refactor
menu and not by hand written codes as follows --

In the class below no properties defined for the private member--
namespace MridulFruitsBusiness
{
    public class Bucket
    {
        private string ownerName;
      
    }
}

now follow-
right click on the ownerName.then click- refactor->Encapsulate Field->ok->apply.
The property code will appear as follows-

namespace MridulFruitsBusiness
{
    public class Bucket
    {
        private string ownerName;
        public string OwnerName
        {
            get { return ownerName; }
            set { ownerName = value; }
        }
     }
}

try to Explore the other pre built items in the refactor menu for methods & others.

when you are developing a enterprise application there may be 100 or more methods
of a class.as a good developer you should let the other coders or users of your
methods about 'what is the task or properties of the methods'.u can use comments
for that.whenever users place the cursor on the method name the respective
comments will be shown so that they know what it does.
these comments are written just before the methods definition by writing '/' three
times as below -

namespace MridulFruitsBusiness
{
public class KeepInBucket
    {
        ///
        /// it keeps the fruits in the bucket by calculation..extra..extra
        ///

        ///
        ///
        ///
        ///
        public string KeepFruits(int value, int keepValue, Bucket bucketObj)
        {
        }
     } 
}
also explore the other type of comments.

Sunday, November 29, 2009

how to use arraylist - arraylist example

here i am going to write a program which shows example of arraylist.
think in this case that i am using arraylist to associate each
student with courses taken.

arraylists are used for collection type purposes.so it is used
widely.

program codes are following-
public class Course
    {
        private string name;
        public string Name
        {
            get { return name; }
            //set { name = value; }
        }
        public Course(string name) {
            this.name = name;
        }
        public string Output()
        {
             return "Course Name : "+ name + " ";
        }
    }
public class Student
    {
        private string name;
        public string Name
        {
            get { return name; }
        }
        private ArrayList courseTaken = new ArrayList();
        public ArrayList CourseTaken
        {
            get { return courseTaken; }
            //set { courseTaken = value; }
        }      
        public Student(string name) {
            this.name = name;      
        }
        public string Output() {
            return "Student Name : "+ name + "\n";
        }
    }
here is the entry form::
public partial class MridulExampleUi : Form
    {
        public MridulExampleUi()
        {
            InitializeComponent();
        }      
        private void MridulExampleUi_Load(object sender, EventArgs e)
        {}
        private void ShowArraylistButton_Click(object sender, EventArgs e)
        {       
            Student studentObj = new Student("mridul");
            Student studentObj3 = new Student("someone");
            Course courseObj1 = new Course("Programming");
            Course courseObj2 = new Course("Web designing");                
            studentObj.CourseTaken.Add(courseObj1);
            studentObj.CourseTaken.Add(courseObj2);
            studentObj3.CourseTaken.Add(courseObj1);         
            ArrayList arrayObj = new ArrayList();
            arrayObj.Add(studentObj);
            arrayObj.Add(studentObj3);          

            string message="";
            foreach (Student studentObj2 in arrayObj)
            {
                message+=studentObj2.Output();
                foreach(Course courseObj3 in studentObj2.CourseTaken)
                {
                  message+=courseObj3.Output();\                     
                }
                message += "\n\n";
            }
            MessageBox.Show(message);          
        }}
here is the program entry class::
static class Program
    {
        ///
        /// The main entry point for the application.
        ///

        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new MridulExampleUi());
        }
    }

executing parameterless base constructor for initializing some attributes of base class

Suppose you have a bank account class.from which you will generate
two classes-savings account & checking account.each one has other
attributes besides common base class attributes.

suppose common 'balance' attribute of base class needed to be
initialized to 0 then you will do that by the base  parameterless
constructor of the base class as the following way -

public abstract class BankAccount
    {
        private string accountNumber;
        private string customerName;
        private double balance;

        public BankAccount(string accountNumber, string customerName) : this()
        {
            this.accountNumber = accountNumber;
            this.customerName = customerName;
        }
       
       // here is the first constructor for initializing balance

        public BankAccount()
        {
            this.balance = 0;
        }
}

Tuesday, November 10, 2009

privacy policy

At http://www.coderarticles.blogspot.com/ the
visitors privacy is followed strictly.
this privacy policy indicates what
types of information of viewers is
received & how it is used.
 
1.Doubleclick DART cookies
by using advertising partners ads for
my website at any time,our partners
may use cookies(like Dart cookies,other
cookies) & web beacons in my website for
serving ads to my site viewers when
viewers visits my website by browsers.

those third party advertising servers
uses best technology to the advertisements
which appears on my website send
to viewers internet browsers directly.
by this way they receive IP addresses,
others of viewers computer.

www.coderarticles.blogspot.com has least
control over these advertisers cookies.

You may accept or not accept cookies by
your browsers.

2.The links to other sites
My site may contain links to other site
for purposes.If viewers go to those
linked websites,blog sites,I will not be
responsible for any security and privacy
of users.viewers are recommended to read
privacy policy of those websites.

3.I may not interchange,sell viewers personal
information which I got by user comments or email
to me & other ways unless I have viewers permission.

At last the contents in this website is
written by me only and not copied from internet
or books,etc.please,please don't try
to copy the info of this website.

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Powered by Blogger