RcBuilder@walla.com
call centre: 054-5614020

custom DataTable

Posted by: RcBuilder  /   Category: abstract / ADO.NET / DataColumn / DataRow / DataTable / DefaultView / Entities / Generic T / inheritance / OOP / SOURCE CODE   /   No Comments
11
Jan
2015

custom DataTable namespace CSCode.DataTables { public abstract class baseDataTable { protected DataTable dataTable; public int RowsCount { get { return this.dataTable.Rows.Count; } } public void Sort(string SortColumn) { var view = this.dataTable.DefaultView; view.Sort = SortColumn; this.dataTable = view.ToTable(); } public void ReplaceString(string ColumnName, string OldValue, string NewValue) { foreach (DataRow row in this.dataTable.Rows) try { row.SetField<string>(ColumnName, row.ToString().Replace(OldValue, NewValue)); } catch { } } public object GetSpecificValue(int RowIndex, string ColumnName) { return this.dataTable.Rows; } public static explicit operator DataTable(baseDataTable me) { return me.dataTable; } public static.

Read more

abstract, virtual and override methods

Posted by: RcBuilder  /   Category: abstract / inheritance / OOP / override / virtual   /   No Comments
27
Nov
2014

abstract, virtual and override methods public abstract class Parent { /* can only defined within an abstract class!! method with no body ! must be implemented (override) in all the inherited classes */ public abstract void fun1(); public virtual void fun2() { Console.WriteLine("Parent.FUN2"); } // can't be overridden (not an abstract, virtual or override) public new void fun3() { Console.WriteLine("Parent.FUN3"); } // can't be overridden (not.

Read more
  • פיתוח מערכות
  • פתרונות טכנולוגים
  • קידום אתרים
  • בניית אתרים