|
So there is no way to convert downward in the inheritance-chain?
Now I think of it, it makes sence
|
|
|
|
|
bertburtbort wrote: So there is no way to convert downward in the inheritance-chain?
That depends on what you think is down. To me down means towards object because that's at the base of everything.
Also, be careful with terms like convert and cast. You cannot cast to a derived class unless the object is at least as derived as the class you are casting to. You can convert to anything if you write the code for it.
|
|
|
|
|
I have to use reporting tool which is available in 2.0 in my application which is in dot net 1.1, if i will use this 2.0 reporting tool then will it have any kind of impact on the application or anything, please reply soon.
|
|
|
|
|
If the reporting tool is to be used as part of your .NET 1.1 project (i.e. added via a reference), you are in for a nasty surprise. You can't link .NET 2 into .NET 1.1.
If it's a separate application, then there isn't a problem running the two runtimes.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
hi!
i have created a small .net project .now i wish to run it on all os without worrying about the .net framework existance on the client machine.
please help me out with this.
|
|
|
|
|
Any .NET application will require the framework to be installed to run.
|
|
|
|
|
There are several commerce tools, which wrapps managed assemblies with required run-time and makes "classic" PE file.
I had tried Thinstall tool with small winforms application. All functionality was good.
Disadvatnage is the price of tool :/.
Geniality is in simplicity.
|
|
|
|
|
I think your only option here is to write a web application. Then your users can use what ever browser they want and they won't need the .net framework installed.
Hope that helps.
Ben
|
|
|
|
|
Don't know what your current solution should be but, in the future a Plan would help
led mike
|
|
|
|
|
I can't believe how many people ask this. If the .NET framework was not needed, why would we install it at all ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Because we install Mono instead?
|
|
|
|
|
|
How to create text file & update the same with events in code behind?
if anybody worked on this plz send me soon
Harish
|
|
|
|
|
i've worked on creating an execution trace log. If this is what your are looking for, then may help you.
(this is in vb.net)
-------------------------------------------
Imports System.Configuration
Imports System.IO
Module LogWriter
Dim LogWriter As TextWriter
Dim LogPathFile As String = ConfigurationSettings.AppSettings("logPath") & "ExecutionTrace.log"
Public Sub WriteLog(ByVal strLogTxt As String)
Static ExecFirstTime As Boolean = True
If File.Exists(LogPathFile) Then
LogWriter = File.AppendText(LogPathFile)
Else
LogWriter = File.CreateText(LogPathFile)
End If
strLogTxt = Now.ToLongTimeString & " " & strLogTxt
LogWriter.WriteLine(strLogTxt)
LogWriter.Close()
End Sub
-----------------------------------------------
|
|
|
|
|
Hi,
I´m trying to load an assembly at runtime with:
ObjectHandle plugin = System.Activator.CreateInstanceFrom(@"C:\PathToDll\MyDll.dll", "PluginClass");
But this returns a strange error:
Exception has been thrown by the target of an invocation.
"The targetNamespace parameter 'MyDll' should be the same value as the targetNamespace 'urn:MyDll' of the schema."
ok, where does a schema come into the picture?
All help would be appreciated.
|
|
|
|
|
I think that would imply that you need to specify the namespace in the class type field and it should match the DLL name, so try:
ObjectHandle plugin = System.Activator.CreateInstanceFrom(@"C:\PathToDll\MyDll.dll", "MyDll.PluginClass");<br />
Hope that helps!
|
|
|
|
|
|
Currently, my server DLL just runs locally without remoting logic, and when I want to read and save a UserAccount class I just pass the class back and forth as is. I use binary serialization to save and read the UserAccount class. I want to do 2 things now.
1) Make the server DLL run remotely as a client activated object.
2) Encrypt the UserAccount and other data passed to the server (like the password).
I would like to know what a best practice would be for #2. I am thinking that I would serialize the UserAccount to a memory stream and then encrypt that data before sending it to/from the server. The receiving side would un-encrypt it and deserialize it back into a UserAccount object.
Currently, my application is a Windows Forms one, but I will eventually learn ASP .NET and make it into a web app. So, I would like to come up with a solution now that would also work with a web app, if possible. I am doing all of this to learn C# and .NET. I don't know SQL or ADO yet, and am wondering if my suggested solution is a good one, or if a real programmer .NET pro would do it differently.
Thanks!
|
|
|
|
|
I am using Managed C++ (not C++/CLI) with VS .NET 2003 and .NET framework 1.1.
I have a DataGrid on one of my forms, and I override the MouseUp event so that when the user clicks on a cell, it highlights the entire row:
System::Void datagrid_MouseUp(System::Object* sender, System::Windows::Forms::MouseEventArgs* e)
{
using System::Drawing::Point;
using System::Windows::Forms::DataGrid;
using System::Windows::Forms::DataGridCell;
Point pt = Point(e->X, e->Y);
DataGrid* datagrid = __try_cast<DataGrid*>(sender);
DataGrid::HitTestInfo* hti = datagrid->HitTest(pt);
if (hti->Type == DataGrid::HitTestType::Cell) {
datagrid->CurrentCell = DataGridCell(hti->Row, hti->Column);
datagrid->Select(hti->Row);
}
else {
}
} However, now my DataGrid will not sort when clicking on one of the header columns. My guess is that since a column header is not a cell, then this event handler says to do nothing; therefore, I need to add code in the else block to tell it to sort if it is a column header. How do I do this? I would rather not have to derive my own class from DataGrid if possible.
--
Marcus Kwok
|
|
|
|
|
Is anyone aware of how to dynamically resize specific item font sizes in a list control?
basically i want to be able to increase the size of the font for the selected item only.
Any help would be greatly received.
Tom
|
|
|
|
|
tom_barber wrote: in a list control?
to confirm ideally a ListBox control
|
|
|
|
|
There's no built-in way to do it. You'd have to ownerdraw each item in the ListBox yourself and, in your painting code, determine how you wanted to paint each item in the list. At least that's how'd you do it in the full .NET Framework. I have no idea if it's possible in the CF.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I'm having a little problem with some unit tests. I have a project that has some files that get copied to the bin folder. Each file has a build action of "Content" and Copy To Output Directory of "Copy Always".
So far so good. Even the projects that are dependent on the project with the files get the files copied to their bin directory. That is perfect - exactly what I want.
However, if I run a unit test, VSTS creates a directory to run the tests in. (Fair enough - good to keep the tests in isolation) The directory looks like this:
C:\<solution folder>\TestResults\<username>_<machine> <datetime>\Out
The parts in angle brackets depend on where, when and who is running the test so the directory structure is unknown (and doesn't exist) at build time. (It creates a new folder for each test run)
The problem is that it does not copy in the additional files I need, just the assemblies and the pdb files. So when the code attempts to load one of the files it fails because it doesn't exist.
Does anyone have any ideas for getting the files to get copied into the correct folder? (i.e. the one with all the assemblies)
|
|
|
|
|
Double clicking the .testrunconfig opens up a dialog that allows you to add additional files to the directory (click Deployment in the dialog)
|
|
|
|
|
Thanks - I've got it working now!
|
|
|
|