Nice site for this wonderful program
http://apophysisrevealed.com/
Saturday, December 5, 2009
Pointers in C#
I need to parse large amount of data in Excel Sheet.
I trying to use pointers for performance issues
Here is how to define pointers in C#
http://msdn.microsoft.com/en-us/library/f58wzh21%28VS.71%29.aspx
I trying to use pointers for performance issues
Here is how to define pointers in C#
http://msdn.microsoft.com/en-us/library/f58wzh21%28VS.71%29.aspx
Friday, December 4, 2009
C# - DatagridView
I was in search of editing cell programmatically.
Here is a simple attempt
Here is a simple attempt
using System.Collections.Generic;
using System.Windows.Forms;
namespace testGridView
{
public partial class Form1 : Form
{
Listcars;
int currentValue;
public Form1()
{
InitializeComponent();
InitializeCarsCollection();
SetLayoutGrid();
this.dataGridView1.DataSource = cars;
}
private void SetLayoutGrid()
{
this.dataGridView1.CellClick += new DataGridViewCellEventHandler(dataGridView1_CellClick);
this.dataGridView1.CellEndEdit += new DataGridViewCellEventHandler(dataGridView1_CellEndEdit);
this.dataGridView1.Dock = DockStyle.Fill;
this.dataGridView1.AutoGenerateColumns = true;
this.dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
this.dataGridView1.EditMode = DataGridViewEditMode.EditProgrammatically;
}
void dataGridView1_CellEndEdit(object sender, DataGridViewCellEventArgs e)
{
int editedValue = (int)this.dataGridView1[e.ColumnIndex, e.RowIndex].Value;
if (editedValue != this.currentValue)
{
System.Windows.Forms.MessageBox.Show(this.dataGridView1[e.ColumnIndex, e.RowIndex].Value.ToString());
}
}
void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
{
if (e.ColumnIndex == 2)
{
this.currentValue = (int)this.dataGridView1[e.ColumnIndex, e.RowIndex].Value;
this.dataGridView1.BeginEdit(true);
}
}
private void InitializeCarsCollection()
{
cars = new List();
cars.Add(new Car { Marque = "Renault", Couleur = "rouge", Cylindree = 6 });
cars.Add(new Car { Marque = "Citroen", Couleur = "bleu", Cylindree = 4 });
cars.Add(new Car { Marque = "Peugeot", Couleur = "vert", Cylindree = 8 });
cars.Add(new Car { Marque = "BMW", Couleur = "jaune", Cylindree = 16 });
}
}
}
Thursday, December 3, 2009
C# Tutorial
Nice Tutorials
http://www.csharp-station.com/Tutorial.aspx
http://www.csharp-station.com/Tutorial.aspx
Wednesday, December 2, 2009
Monday, November 30, 2009
Programming Paradigms
Stanford Courses programming
http://deimos3.apple.com/WebObjects/Core.woa/Browse/itunes.stanford.edu.1617348111
http://deimos3.apple.com/WebObjects/Core.woa/Browse/itunes.stanford.edu.1617348111
Subscribe to:
Posts (Atom)