Click here to Skip to main content
16,005,290 members
Home / Discussions / C#
   

C#

 
GeneralRe: stopping service via WMI Pin
Heath Stewart4-Jan-05 10:51
protectorHeath Stewart4-Jan-05 10:51 
GeneralRe: stopping service via WMI Pin
thespiff5-Jan-05 1:03
thespiff5-Jan-05 1:03 
GeneralRe: stopping service via WMI Pin
Heath Stewart5-Jan-05 4:50
protectorHeath Stewart5-Jan-05 4:50 
GeneralRe: stopping service via WMI Pin
thespiff6-Jan-05 2:19
thespiff6-Jan-05 2:19 
GeneralImplementing mouse panning functionality Pin
Andres Coder4-Jan-05 7:55
Andres Coder4-Jan-05 7:55 
GeneralRe: Implementing mouse panning functionality Pin
Heath Stewart4-Jan-05 11:30
protectorHeath Stewart4-Jan-05 11:30 
GeneralIs this acceptable practice Pin
Wayne Phipps4-Jan-05 7:54
Wayne Phipps4-Jan-05 7:54 
GeneralRe: Is this acceptable practice Pin
perlmunger4-Jan-05 8:41
perlmunger4-Jan-05 8:41 
This is certainly "acceptable", however, you might ask yourself "what is the benefit?". Considering that your DataTable and ColumnNumber fields appear to be instance variables, there's no reason when you need that specific column name you can't just call it directly as in DataTable.Columns[ColumnNumber].ColumnName.
If what you want is a short cut method, create some methods like this (that aren't properties).
private string GetColumnNameAt( int index )
{
     if( DataTable.Columns[index] != null )
          return DataTable.Columns[index].ColumnName;
}

private void SetColumnNameAt( int index, string name )
{
     if( DataTable.Columns[index] != null )
          DataTable.Columns[index].ColumnName = name;
}

Let me know if you need clarification.

Best Regards.

-Matt

------------------------------------------

The 3 great virtues of a programmer:
Laziness, Impatience, and Hubris.
--Larry Wall
QuestionHow To Serialize Multiples Refereces to The Same Object? Pin
fmarcos4-Jan-05 7:18
fmarcos4-Jan-05 7:18 
AnswerRe: How To Serialize Multiples Refereces to The Same Object? Pin
Matt Gerrans4-Jan-05 8:03
Matt Gerrans4-Jan-05 8:03 
GeneralLaunching Forms Dynamically Pin
SignMan3594-Jan-05 6:14
SignMan3594-Jan-05 6:14 
GeneralRe: Launching Forms Dynamically Pin
Nick Parker4-Jan-05 7:23
protectorNick Parker4-Jan-05 7:23 
GeneralRe: Launching Forms Dynamically Pin
SignMan3594-Jan-05 14:28
SignMan3594-Jan-05 14:28 
GeneralRe: Launching Forms Dynamically Pin
Anonymous5-Jan-05 4:01
Anonymous5-Jan-05 4:01 
GeneralRe: Launching Forms Dynamically Pin
SignMan3595-Jan-05 8:34
SignMan3595-Jan-05 8:34 
GeneralRe: Launching Forms Dynamically Pin
Skynyrd6-Jan-05 3:30
Skynyrd6-Jan-05 3:30 
GeneralControlling Scroll bars Pin
Wjousts4-Jan-05 5:32
Wjousts4-Jan-05 5:32 
GeneralDeclaring inherited class objects Pin
MarkBremmer4-Jan-05 5:32
MarkBremmer4-Jan-05 5:32 
GeneralRe: Declaring inherited class objects Pin
Bahadir Cambel4-Jan-05 6:57
Bahadir Cambel4-Jan-05 6:57 
GeneralRe: Declaring inherited class objects Pin
Steven Campbell4-Jan-05 16:52
Steven Campbell4-Jan-05 16:52 
GeneralRe: Declaring inherited class objects Pin
Anonymous5-Jan-05 4:20
Anonymous5-Jan-05 4:20 
Generalmulit-client server programming question Pin
ppp0014-Jan-05 0:22
ppp0014-Jan-05 0:22 
GeneralRe: mulit-client server programming question Pin
perlmunger4-Jan-05 8:30
perlmunger4-Jan-05 8:30 
QuestionHow to get the Application path of a console app.? Pin
senfgurke3-Jan-05 19:35
senfgurke3-Jan-05 19:35 
AnswerRe: How to get the Application path of a console app.? Pin
senfgurke3-Jan-05 20:08
senfgurke3-Jan-05 20:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.