|
hassanasp wrote: cannot convert this line into C# Me.Label1.Text = reader.Item(0).ToString
If you're using indexers in vb they are in parenthesis but in c# they are in [].
So have a try with
Label1.Text = reader.Item[0].ToString
hassanasp wrote: while (reader.Read()=true)
In C# equality is == so:
while (reader.Read()==true)
or
while (reader.Read())
|
|
|
|
|
the problem is when write(reader.)no property item found in C# but in vb is found
label1.Text = reader.Item[0].ToString;
Error 1 'System.Data.OleDb.OleDbDataReader' does not contain a definition for 'Item'
Ahmed hassan
|
|
|
|
|
Item property isn't language specific. It exists in the framework, not in the language see: OleDbDataReader.Item Property (Int32)[^].
One problem you have is that ToString is a method so it must have parenthesis so:
label1.Text = reader.Item[0].ToString();
or
label1.Text = reader[0].ToString();
|
|
|
|
|
what's the differences between process and thread?
what's the advantage of using thread?
thanks
|
|
|
|
|
hung1984 wrote: what's the advantage of using thread?
You can execute multiple tasks simultaneously.
hung1984 wrote: what's the differences between process and thread?
here you go[^]
|
|
|
|
|
hung1984 wrote: what's the differences between process and thread?
Try google[^]?
|
|
|
|
|
I am trying to figure out how to programmatically send a WINDPROC message to a control that will simulate a mouse click on an associated scrollbar arrow. Can anyone give me some advice?
Darryl Borden
Principal IT Analyst
dborden@eprod.com
|
|
|
|
|
|
I want to place treeview inside DataGridView such that each child node of treeview becomes datarow for DatagridView. Any idea!!!
Thanks in advance/
|
|
|
|
|
You'll have to write your own control to do this, I believe. Have fun! There are a bunch of commercial versions, if you're willing to pay for it.
|
|
|
|
|
Hi All,
WndProc is usually implemented in windows form to recieve windows messages and other messages posted using that mechanism. Is it possible to implement WndProc in a dll?
|
|
|
|
|
Google says yes 61700 times.
|
|
|
|
|
Ya, google says blah blah times, but not what I am asking...
The problem here is WndProc applies to windows and controls. I want to wrape a dll which is currently being used in my application so that I can use observer pattern to re-engineer my application. My application works on the basis of USER messages recieved from a dll created in VC++.
I will be thankful for any help or links...
|
|
|
|
|
Member 2437763 wrote: Is it possible to implement WndProc in a dll?
If your class is inherited from Control .
|
|
|
|
|
how to get a specified column value from the list view.
listview row contains (x,y,z) and i want to get only the y ?
|
|
|
|
|
Hi prasadbuddhika,
Try listview.items[rowIndex].subitems[IndexOfColum]
items[rowIndex] returns the first column and subitems[0] is the second column etc...
Hope this helps...
|
|
|
|
|
bcozican wrote: subitems[0] is the second column
IIRC, it is the first.
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 beta 1 - out now! ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
listview.items[0].subitems[0] refers to the second column in the listview. listview.items[0] refers to the first column. Or am i missing something..?
|
|
|
|
|
bcozican wrote: Or am i missing something..?
A unit test perhaps! I just double checked, SubItems[0] returns the 1st column.
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 beta 1 - out now! ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
From MSDN:
The first subitem in the ListViewItem..::.ListViewSubItemCollection is always the item that owns the subitems. When performing operations on subitems in the collection, be sure to reference index position 1 instead of 0 to make changes to the first subitem.
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 beta 1 - out now! ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
Sorry my bad
|
|
|
|
|
Hello
I have a plug in that I wrote. It is located under :
C:\Program Files\Plugs\t01\OutlookAddIn1.dll
The following code (1) returns the following result (2)
(1)
using System.Reflection
Assembly assr = Assembly.GetExecutingAssembly();
(2)
...\Assembly\blah blah
How do I retrieve the path as specified in [A] using C#?
Any help would be greatly appreciated.
ChristiaanS
|
|
|
|
|
typeof(ATypeInOutlookAddinAssembly).Assembly
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 beta 1 - out now! ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
I have already tried that. It is the same as I mentioned since you are returning an assembly. Maybe I am not implementing it right?
Thanks for the help so far.
ChristiaanS
|
|
|
|
|