|
I need a source which can check whether I have installed .Net framework 2.0 or not.
Thanks.
Nothing!! But gonzo!!
|
|
|
|
|
You need to create a precondition in your setup project that checks to see if your version of the .net framework is installed. Your software won't install unless your precondition has been met. You don't need to write any code for this, it is the right way to do what you are talking about. It is a very, very easy and common task.
"If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
I get all the news I need from the weather report - Paul Simon (from "The Only Living Boy in New York")
|
|
|
|
|
You can write C++ code to do this, but not C#, for obvious reasons.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
You may have to explain this one to him. If he posted a question like this, it's apparent that he doesn't have the knowledge to understand the blindingly obvious.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Have you tried looking on Google or CP? There is at least one article[^] here that explains how to do this, and also gives you a reference to some C++ code that you will need to use if you are trying to do this from an installer.
|
|
|
|
|
Why am I getting this compiler error: Use of possibly unassigned field 'PropertyToPropertyConstraints'
for this code:
public struct foobar<br />
{<br />
public readonly int[,] PropertyToPropertyConstraints;<br />
<br />
public foobar(int bar)<br />
{<br />
PropertyToPropertyConstraints[0, 0] = -1;<br />
}<br />
}
I'm sure there is something fundamental and basic I'm missing here, probably having to do with how I use the array. But the compiler error is confusing.
|
|
|
|
|
well, you didn't say
PTPC = new int[x,x];
anywhere, you just started setting values.
My current favourite word is: PIE!
Good ol' pie, it's been a while.
|
|
|
|
|
I'm not sure I follow.
Where would I say this? Initialization isn't allowed in the declaration (in a struct). Are you saying I would need to do this in the public constructor itself?
It's my understanding that fields are automatically initialized in a struct. For instance, my int's are all initialized. The int's in my int array are not?
Man, this struct stuff has me all confused.
|
|
|
|
|
You were right, that was it. I needed to create the array in the public constructor. I had tried to create it in the declaration, been punished, and didn't think about creating it in the constructor, where I was assigning values. (My real code was a lot more complex than the example I used here, but I should have spotted it in the example).
|
|
|
|
|
How can I convert a double to string with a [+] or a [-] sign symbol
for example I have:
double x = 500.12;
double y = -500.12;
I want x to be diplayed as:
+500.12
and y to be displayed as:
-500.12
Please help
|
|
|
|
|
The negative number should come out with a - sign already.
So once you've used .ToString, if the first char isn't a '-' then put a '+' at the start:
double x = 500.12;
double y = -500.12;
string sX;
string sY;
sX = x.ToString();
if(!sX.StartsWith("-"))
sX = "+" + sX;
sY = y.ToString();
if(!sY.StartsWith("-"))
sY = "+" + sY;
Console.WriteLine(sX + "\n" + sY);
The output should be:
+500.12<br />
-500.12
My current favourite word is: PIE!
Good ol' pie, it's been a while.
|
|
|
|
|
Thanks for the opportunity to look into this.
System.Console.WriteLine ( ( 500.12).ToString("+#.##;-#.##" ) ) ;
System.Console.WriteLine ( (-500.12).ToString("+#.##;-#.##" ) ) ;
|
|
|
|
|
Works like a charm. Thanks.
|
|
|
|
|
I create a dynamic table using the code below (c#), but I couldn't figure out how to set the column width (in column3 comments).
DataTable tbl;
DataColumn col;
tbl = new DataTable();
col = new DataColumn("column1");
tbl.Columns.Add(col);
col = new DataColumn("column2");
tbl.Columns.Add(col);
col = new DataColumn("column3 comments");
tbl.Columns.Add(col);
tbl.AcceptChanges();
DataRow r;
r = tbl.NewRow();
r["column1"] = "This is 1";
r["column2"] = "This is 2";
r["column3 comments"] = "Comments is really long & I need to set the width for this";
tbl.Rows.Add(r);
|
|
|
|
|
Ummmm... I assume you mean when it's displayed somehow?
|
|
|
|
|
yeh...when it display. i connect it to the datagrid, but i couldn't find a way to set the width of the column in there.
|
|
|
|
|
I have developed application A,B and C that uses the same database. Because i need to be working at different places sometimes i found computers where i cannot connect to the database as i do in my house, so i was wondering how to have A,B and C in the same project so i can add the mdf file only to that big project instead of each individual project? Because the data from one application is important to the other!!!
Thanks all,
Luis E Tineo S
|
|
|
|
|
Why do you need to add the mdf file to each individual project? Normally, what we used to do is that we have the database on SQL server, All applications which are using this database connect to this Server only.. We don't put the database file to each application and we don't install that database file on each client's machines..
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
Michael Sync wrote: Why do you need to add the mdf file to each individual project?
I don't have my own computer so i just go from lab to lab or place to place to work on my final project, on my grilfriend's computer i have sql server running but there are computers where i cannot even install it.
I think i need to have this file so i can still access the data i have stored on it to test the application
Michael Sync wrote: Normally, what we used to do is that we have the database on SQL server,
this is what i would like to do but due to the lack of a computer i cannot do it so i need to find other solutions like adding a mdf file
Luis E Tineo S
|
|
|
|
|
maybe, you can create one *.sln file and add your projects (A,B and C) to that solution file. Do you have more than one project file in your application??
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
Hello,
For each project file i have one application, would be wiser to create a new application and call the other applications from this one?
Luis E Tineo S
|
|
|
|
|
Each application has only one project file, right? For example, The application called "The Student Managment System" has only one project file called "StudentMgmtSys.csproj" or "StudentMgmtSys.vbproj".
Then, create one blank solution file in Visual Studio. Add your projects to that solution file.. And set the startup project depend on which one you wanna run..
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
I am trying to write a sendto shortcut that processes a list of files. I have written the project to use the command line arguement, but the command line arguement has an arguement on size. Does anyone know how I can not be restricted on the number of files I select for the sendto. Thanks.
|
|
|
|
|
smarttom99 wrote: Does anyone know how I can not be restricted on the number of files I select for the sendto.
Can you tell us the example? now, how it is restricted?
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
Hey all,
I am creating some test certificates with makecert to ID each client...
Now i have a few questions:
How can i use that certificate on a way to id the client with the server? I was thinking on creating a table to store the rawdata of each client certificate and then during validation process verifiy if the client certificate matchs the rawdata from the database.... and the same goes for the client, i will have a table storing the server info...
If i have a certificate created with the makecert tool that cert is only valid for that machine? or can be install elsewhere?
Can somebody give me a complete server/client example of ssl usage assuming you have your own certificate.... but just the ssl part and what u need to include!?
Thanks in advance,
Luis E Tineo S
|
|
|
|