|
Please tell me why I received errors when doing this:
class MyClass : DataTable
{
public MyClass():base()
{
DataTable dt = new DataTable();
this = dt;// errors occur here, what can I do to let dt to "this"
}
}
Thank you for your help.
|
|
|
|
|
What are you trying to do? When inheriting from DataTable then this is already a new empty DataTable. You could right there start adding data:
class MyClass : DataTable
{
public MyClass():base()
{
this.Columns.Add(...);
this.Rows.Add(...);
}
}
|
|
|
|
|
This question is not really about the DataTable class. The this reference is always read-only, regardless of where it is being used.
Josh
|
|
|
|
|
Is there a way to create an executable using the .Net 1.1 version of the framework with Visual Studio 2005? I want to create a bootable CD for Windows PE that uses a C# program as the front end menu system. Windows PE can add on .NET 1.1, but no information exists on using .NET 2.0 on Windows PE.
Thanks,
Steve B.
|
|
|
|
|
Strictly speaking it can't be done; but I know of a hack that seems to do it. If you are using specific 2.0 libraries forgot it.
Heres the link anyway
http://blogs.msdn.com/jomo_fisher/[^]
Look where you want to go not where you don't want to crash.
Bikers Bible
|
|
|
|
|
Is there a way I can disable a button (DataGridViewButtonCell) on a DataGridView?
Currently, I am setting the cell's readonly property to true and trapping the CellContentClick event and doing nothing if it is readonly.
V
|
|
|
|
|
.NET CF doesn't support accesing the HTML content of a web page with
DocumentText property.
In what way can I have access with content of a web page ?
Do anyone have any solution of this problem ?
Thanks.
Seba
|
|
|
|
|
1. What is the use of making assembly as .exe in .net??
2. can be load the private assembly at run time in .net, if yes tell me how we can do it??
Deepak Garg
-- modified at 12:01 Tuesday 13th June, 2006
|
|
|
|
|
deepak garg wrote: What is the use of making assembly as .exe??
Operating systems have a concept called the "executable." An executable file is essentially a program that can run in the operating system. The standard convention in windows is to mark an executable file with the .exe extension.
deepak garg wrote: and how we can get the version and culture information of a .dll file.??
Check out the System.Reflection.Assembly class.
Josh
|
|
|
|
|
Can any one tell me what's the best way to import data from excel,text or csv file and how can this be done?
|
|
|
|
|
if you want to import the data from excel , text or csv into SQL Server - you can do it using the DTS Wizards (Import/Export Wizards)
|
|
|
|
|
Hi all,
I am interested in MSMQ but i dont know how to proceed with it.I just know the basic of MSMQ and want to know more about.
Could anyone help me by suggesting any materials or books which would guide me in MSMQ.
Thanks in advance,
Do not wait to strike till the iron is hot; but make it hot by striking.
|
|
|
|
|
Hi,
Can anyone please tell me what's the relation between aspnet_wp and CLR.Is aspnet_wp is a part of CLR which executes/Compiles the web related Classes just like JIT in windows based application?
Regards,
Ritesh
|
|
|
|
|
Hi friends:
I can not install a COM+ proxy on a computer (with W2k3server and .Net
Framework 2.0)
but I can install the same proxy on the same computer without .Net Framework 2.0
How i can install the proxy on a computer with windows 2003 and .Net Framework 2.0
Can you help me ?
Thanks in advance
Favio
|
|
|
|
|
So I have run into a serious problem that did not exist when I left work last week. I have items that are dissappearing from a collection as I iterate through it. I have a class called host which has a List<String> in it which has a list of Urls. There is only one way to get and remove urls, a property called NextUrl.
<br />
public string NextUrl<br />
{<br />
get<br />
{<br />
string url;<br />
lock (_urls)<br />
{<br />
url = _urls[0];<br />
_urls.RemoveAt(0);<br />
_lastTouched = DateTime.Now; <br />
}<br />
return url;<br />
}<br />
}
The loop is as follows
<br />
foreach (Host h in currentList)<br />
{<br />
if (h.Count > 0)<br />
{<br />
DownloadUrlAsync(h.NextUrl);<br />
}<br />
} <br />
currentList is a contains a List of hosts.
If I step though the code at both the if statement, the { and DownloadAsynucUrl items dissapear from the collection. I am not sure how this happens. By the time it gets to the NextUrl property there are no Urls left in the collection. When the program first hits the if statement there are 6. Has anyone seen anything like this? Am I crazy?
Thanks,
Steve
|
|
|
|
|
How to migrate the code of .Net 1.1 (2003) framework to .Net 2.0 (2005)...
|
|
|
|
|
Open the project in Visual Studio 2005, and you will be presented with the migration wizard.
---
b { font-weight: normal; }
|
|
|
|
|
But its not migrating..it just creating a solution with out any .cs files in my old project in framework 1.1 (2003)..is anything needed to be done in the wizard for this thing
|
|
|
|
|
Arun Kumar Babu wrote: with out any .cs files in my old project
Do you mean that no .cs files have been added or modified?
That's right. Migration from VS 2003 to VS 2005 does not modify source code, as VS 2005 supoorts both new and old syntex. The migration is done through adding/changing a couple of project setting flags.
Stricktly speaking, only the VS 2003 project has been migrated and the source code hasn't.
- It's easier to make than to correct a mistake.
|
|
|
|
|
Not Like that..I have a project with some references in .Net framework 1.1(2003)..When i open the solution in .Net Framework 2.0,all the .cs files and reference are removed,showing only the solution folder in solution explorer...
Jun Du wrote: So i want evry one to be there when i open in framework 2.0
|
|
|
|
|
Arun Kumar Babu wrote: Not Like that..I have a project with some references in .Net framework 1.1(2003)..When i open the solution in .Net Framework 2.0,all the .cs files and reference are removed,showing only the solution folder in solution explorer...
I never encountered that.
Could you check what language your .NET 1.1 code was written in and if your VS2005 installation has support for that language?
BTW, I didn't say the following in your quote:
Arun Kumar Babu wrote: Jun Du wrote:
So i want evry one to be there when i open in framework 2.0
- It's easier to make than to correct a mistake.
|
|
|
|
|
Hi,
I have recetly moved from Java to .NET/C#.
I am trying to download a file from my test website and save it to disk on any client machine (this means getting access to each clients hard disk etc).
In java this required the use of applets etc...
I have so far not found the corresponding code in C#/.NET.
I am wanting to
(i) click a button in a web page on my website.
(ii) do some security checks before proceeding
(iii) stream the file(s) from the source directory on the website host machine
(iv) stream the file(s) to the client
(v) save the file(s) to the clients hard disk.
(vi) the original file may need to be zipped so the client side operation may require an automatic unzipping process
I know I could zip all the files and then add a link to my webpage that the user selects to download the file and then they manually unzip the relevant files but in some instances an automatic approach would be better.
Any help greatly appreciated.
I have also posted this to the C# board if this is the wrong discussion board.
I will keep searching.
Regards Andrew Mercer
|
|
|
|
|
Hi all,
Is there a way to maintain authentification if I had to send multiple requests ?
Here my current code:
HttpWebRequest webrequest = (HttpWebRequest)WebRequest.Create("http://.........");<br />
webrequest.Credentials = new NetworkCredential("....", "......");<br />
webresponse = (HttpWebResponse)webrequest.GetResponse();
For example, with MFC, I just create 1 HttpConnection and I can do any number of requests.
m_pHttpConnection = m_InternetSession.GetHttpConnection(strServer, nPort, strUserName, strPassword);
But may be internally, the login password is sent for every request?
|
|
|
|
|
I have a vb.net (.net 2.0) app that I installed. I know where the app is on my system, and I can run it from a batch file, but I can't seem to get the damn thing to run from within a non-.Net app. I've tried createprocess, and winexec, but nothing seems to work. I even tried to use createprocess to run cmd.exe with the batch file as a parameter, but that doesn't work either.
Does anyone have any clues?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
-- modified at 10:21 Monday 12th June, 2006
|
|
|
|
|
Hi, i just want to know if the .NET Framework can be installed and run apps in a 16 bit 486 based PC with win9X or win3X. Thanks in advance.
|
|
|
|