|
hi
try this:
using System.Collections.Generic;
|
|
|
|
|
I have this
using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
using System.Data;
using System.Data.SqlClient;
using System.Data.SqlTypes;
using System.Configuration;
using System.Collections;
using System.Runtime.Serialization;
--------------------------------------------------------
1 line of code equals many bugs. So don't write any!!
My mad coder blog
|
|
|
|
|
Is that method in a generic class? If not, T won't be recognized, no matter what namespaces you include (unless you actually were to create a type named T).
|
|
|
|
|
k, thanks.
thats the problem
--------------------------------------------------------
1 line of code equals many bugs. So don't write any!!
My mad coder blog
|
|
|
|
|
T is the name of the generic template. However, it doesn't know that because you've not told it that T is a generic template, so it treats it as a real type. Since you don't have a type called T it causes an error
Ista wrote: public MyMethod( T myType ){}
Also, this is not the code you have - This code won't compile for reasons other than those you've specified.
public void MyMethod<T>(T myType){}
or
public class MyClass<T>
{
public void MyMethod(T myType) {}
}
|
|
|
|
|
Hi guys,
I need some help please, I am a newbie with C# and I am stuck on something.
I am using dataset to get data from the database, here is some bits of my code
SqlDataAdapter adp= new SqlDataAdapter();
DataSet ds=new DataSet();
adp.Fill(ds,"tbACJE");
if(ds.Tables["tbACJE"].Rows.Count>1)
{
System.Data.DataRow rd= ds.Tables["tbACJE"].Rows[0];
Double fTemp= 0.0;
fTemp=double.Parse(ds.Tables["tbACJE"].Compute("SUM(rd[0] + rd[1])", "").ToString());
What I am trying to do is
1) if there are more than 1 rows get the sum of the first 2 columns and if it's zero than Message and if not zero than get the difference amount.
Please help???
sasa
|
|
|
|
|
Hi
I'm using function in a dll written in C++ / MFC Visual Studio 6.
This use to work fine in the .NET framework 1.1, but I upgraded to Visual Studio 2005 and when I use any function from the dll I get a message 'LoaderLock was detected'. Are there any work around without changing the API?
Cheers Johan
|
|
|
|
|
What does that Dll do exactly?
--------------------------------------------------------
1 line of code equals many bugs. So don't write any!!
My mad coder blog
|
|
|
|
|
|
GOD BLESS U
Hai
Difference betweeen .Dll and .exe files in .netplease give atleast 6 to 10 diferences)
thank u 4 ur kind support
bye 4 now
arun
|
|
|
|
|
Are writing a test? It sounds very much like that.
In that case, shame on you for trying to fool people into helping you passing a test that you don't have sufficient knowledge to pass on your own.
---
b { font-weight: normal; }
|
|
|
|
|
a dll file has an extension of ".DLL" and an exe has an extension of ".EXE"
Xorry, couldn't resist
--------------------------------------------------------
1 line of code equals many bugs. So don't write any!!
My mad coder blog
|
|
|
|
|
Hey, that's clever!
But could we imagine a dll with the extension .exe and vice-versa?
hehe...
sorry, I couldn't resist either!
|
|
|
|
|
Hello,
How can I make a search that do not only find the exact match but also similiar matches with xpath ?
For example,
our xml fragment is -lets say- like this :
<br />
<ROOT><br />
<DATA attribute1 = "123" attribute2 = "987"><br />
<AA> something here </AA><br />
<AB> again something here </AB><br />
</DATA><br />
<DATA attribute1 = "abc" attribute2 = "def"><br />
<BA> 123 </BA><br />
<BB> 987 </BB><br />
</DATA><br />
</ROOT><br />
..and I want to make a search to find all DATA's that contains the string "23" anywhere (at its attributes, childs, childs' attributes etc.
So after my search I will find the first DATA element (because its attribut1 is 123 and this contains 23) and also the second DATA element (because its BA child's value is 123 which contains 23).
Can I do this using xpath (I haven't find any SQL like "like" method under xpath) or may I choose another strategy?
.:: Something is Wrong ::.
|
|
|
|
|
You Must Load Youre Data To dataset Or dataView and then Search with Youre Cretria ;
MHF
|
|
|
|
|
may I use sql like select statements and complex queries in this dataset ?
also how can I acces element attributes through this dataset
.:: Something is Wrong ::.
|
|
|
|
|
DataTable Have Select Method You can use it
But for Complex Queries you must write a class or function that use that
Search in the internet mybe Find some codes
MHF
-- modified at 10:13 Tuesday 15th August, 2006
|
|
|
|
|
pashje wrote: Can I do this using xpath (I haven't find any SQL like "like" method under xpath) or may I choose another strategy?
yes you should
XmlDocument doc = new XmlDocument()
doc.Load(filename);
XmlNodeList list = doc.SelectNodes("//DATA@[your argusments here]");
I suggest grabbing the old book "XML in a nutshell". You need to know a few commands for xpath to get this to work.
Then just to a foreach on the XmlNodeList
foreach(XmlNode node in list){}
--------------------------------------------------------
1 line of code equals many bugs. So don't write any!!
My mad coder blog
|
|
|
|
|
contains would be the most useful function in this case
XmlNodeList list = doc.SelectNodes("//DATA[contains(.,'123')]");
only two letters away from being an asset
|
|
|
|
|
i create a application in c#, and i want to call other program such as program in namespace 1 call program in namespace 2 , anybody can help?
-- modified at 8:18 Monday 14th August, 2006
|
|
|
|
|
Calculator will launch by this.
System.Diagnostics.Process.Start("calc.exe");
|
|
|
|
|
I'm experimenting with a very basic .Net remoting client server i wanted to make sure i could get it to work before trying something more complex the client server works fine locally i.e. with both server and client on the same machine however when going between two different computers which are local on the network it doesn't work i get a message simmilar to unable to connect to remote server or something to that effect the configuration files are below:
<CLIENT>
<configuration>
<system.runtime.remoting>
<application>
<client>
<wellknown type="GPSWaypathData, GPSWaypathData" url="tcp://10.34.144.109:8989/GPSWaypathData" />
</client>
</application>
</system.runtime.remoting>
</configuration>
<SERVER>
<configuration>
<system.runtime.remoting>
<application>
<service>
<wellknown mode="Singleton" type="GPSWaypathData, GPSWaypathData" objectUri="GPSWaypathData" />
</service>
<channels>
<channel ref="tcp" port="8989" />
</channels>
</application>
</system.runtime.remoting>
</configuration>
Any help would be really apreciated
-- modified at 8:02 Monday 14th August, 2006
|
|
|
|
|
Did you check the firewall settings (Control Panel->Windows Firewall) on the server? It is possible that port 8989 is blocked for incoming traffic. You could try explicitly adding the port to the Exceptions list.
|
|
|
|
|
No theres no firewall in place between either of the computers
|
|
|
|
|
I meant the firewall built into Windows.
Try running netstat -a on the command line to check if the server is running on the port you specified. To check whether the server is reachable from the client, try running "telnet <server ip=""> <port no="">" and see if it connects.
|
|
|
|