|
As a C# question: write any C# program, if it runs, there is at least one
.NET available; if you get a weird error message, the .NET version you built
against is not available.
Search CodeProject for "Framework version" and you will find some good articles[^].
|
|
|
|
|
Hi!
Several approaches look at the registry: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP has a subkey for each installed version of the framework, along with further information (for example if a service pack is installed or not).
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
A bit late but as another suggestion you could look at the file mscoree.dll in your system32 directory. This files version indicates the version installed on your machine.
|
|
|
|
|
Hi,
This is a splitoff from my previous thread, but since this one is pretty narrow, I decided to give it separate thread... hope that this is ok with admins.
Anyhow... I have a .DLL i compiled, and added as a reference to a C++ project in .NET. Now I need to be able to access its members somehow. Both library and its namespace are called HyTest, however HyTest:: or HyTest. yeild nothing. Is there a specific way to access members of a DLL (written in C#) compiled in .NET?
wbr,
Victor
|
|
|
|
|
Hi Victor,
Whether you refer to a VB.NET, a C#.NET or a managed C++ DLL makes no difference;
from the outside you almost cant tell what language was used to build the DLL !
So treat it as if it were some other managed C++ DLL.
|
|
|
|
|
Well the thing is I don't know how to treat a DLL =)
How exactly do I access classes inside of it?
|
|
|
|
|
I dont know for C++, but this is how it works in C#:
assuming you have added to your project a reference to the new DLL,
you can access the types (classes, structs, enums) in the new DLL exactly
as if they were in your own exe, i.e. you use the class name if it resides in the same
namespace, and namespace.classname otherwise.
|
|
|
|
|
C++ seems to handle it differently.
I cannot use the public classes from included library, or include the DLL into given local class for that matter.
|
|
|
|
|
Hi,
I now have a managed C++ project that calls upon a C# dll.
It works as expected.
If your C++ is managed code, it is as I said before.
If your C++ is unmanaged, you will need P/Invoke.
|
|
|
|
|
unless you're using C++.net (don't recall the official name) you can only access .net code in c++ as a COM object.
PS this would probably be better posted in the C++ forum.
--
You have to explain to them [VB coders] what you mean by "typed". their first response is likely to be something like, "Of course my code is typed. Do you think i magically project it onto the screen with the power of my mind?" --- John Simmons / outlaw programmer
|
|
|
|
|
Hi,
When I compile my project and it automatically creates a .dll file in my websites bin directory. plus it creates relating .pdb file. Why does it do this? I don't want that file there, and any other file, just the .dll file. Am I correct or incorrect in saying this? How can I do this?
Regards
ma se
|
|
|
|
|
The pdb contains the debug symbols for your code. It's used to help during debugging so if I was you I'd leave it where it is :P
If you want to build a version for general release you need to change the ComboBox next to the Green arrow (the build button) from debug to release.
|
|
|
|
|
The pdb file stores the debugging information. When you build the software in debug mode you get the pdb file, if you use the release mode you just get the dll. The other files your talking about may be dependent dll's or configuration file, etc.
|
|
|
|
|
Hello,
I have a big project here (all in .net 2.0 and c#) that seems to experience message pump freezes on some computers. At least thats what I'm thinking:
This specifically seems to happen when scrolling the mousewheel within a DomainUpDown control and then leaving it's bounds with the mousepointer, while still scrolling the mousewheel.
The application just freezes completely (including all background threads). Right-clicking the application in the taskbar seems to restart the pump. I've tried overriding the OnMouseLeave method of the control and then calling System.Windows.Forms.Application.DoEvents() from there, but that doesn't seem to help. (And yes, I know it isn't very good practice to be calling that method in the first place ).
Any help is very much appreciated, thank you in advance!
Standards are great! Everybody should have one!
|
|
|
|
|
Hi All,
I writing some wizard in my project.
I want to do it by using panel`s and in any screen change i will show some other panel.
My problem are ...
1. Is there some other way to writing wizard as i need ( the wizard have 7 screens and need to be able move "next" and "back" in the pages ).
2. When i want to edit some of the panels i wand to invisible the all other panels and their controls - for some reason i see the controls of the other panel also. How can i separate the controls that i put on panel_X and those of panel_y ?
Thanks of any help.
|
|
|
|
|
|
Hi,
Is it possible to create a constant instance of a struct.
Example:
I have a struct:
<br />
public struct Point<br />
{<br />
int x,y;<br />
}<br />
and I want to do:
<br />
public <big>const</big> Point my_Point;<br />
my_Point.x = 2;<br />
my_Point.y = 4;<br />
Thanks,
|
|
|
|
|
I think you need to make it a static readonly .
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
* Reading: Developer Day 5
Ready to Give up - Your help will be much appreciated.
My website
|
|
|
|
|
Thanks, But:
If you do,
Public static readonly Point;
and after you try to do,
Point.x = 3;
you get an error, as Point is readonly and can't be assign.
So what is the right way...
|
|
|
|
|
Point is immutable. You couldn't change it even if you wanted to.
public static readonly Point myPoint = new Point(3,5);
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
* Reading: Developer Day 5
Ready to Give up - Your help will be much appreciated.
My website
|
|
|
|
|
public static readonly Point p24=new Point(2, 4);
|
|
|
|
|
If your goal is to have a Point type, just use the built-in one: System.Drawing.Point .
If your goal is to create a type that works like System.Drawing.Point, then look at how System.Drawing.Point is defined.
If your goal is to create a type that works the way you described (which I don't recommend)...
public struct Point
{
private int _x,_y,_z;
public int
x
{
get
{
if ( _z%2 == 1 )
{
return ( _x ) ;
}
else
{
}
}
set
{
if ( _z%2 == 0 )
{
_x = value ;
_z |= 1 ;
}
else
{
}
}
}
public int
y
{
get
{
if ( _z > 1 )
{
return ( _y ) ;
}
else
{
}
}
set
{
if ( _z < 2 )
{
_y = value ;
_z |= 2 ;
}
else
{
}
}
}
Then
<br />
public Point my_Point;<br />
my_Point.x = 2;<br />
my_Point.y = 4;<br />
<br />
my_Point.x = 5;
|
|
|
|
|
You almost convinced me to embrace nullable types...
|
|
|
|
|
I didn't think to use nullable types until some time after I posted.
Thanks for reminding me, I'll get right on that.
|
|
|
|
|
Luc Pattyn wrote: You almost convinced me to embrace nullable types...
Nullable types are gooooodddd!!! Come and see the pretty nullable types.....
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
* Reading: Developer Day 5
Ready to Give up - Your help will be much appreciated.
My website
|
|
|
|