-
- check valid path
by IMBack
- 12 Replies
- Last post
by Mark Dawson
- Is there away to check a valid DOS path in c#
ex: if the user types
zzz:\test.txt and the path is invalid, return error message.
using VS2003 .NET1.1
Thank you,
-
- C# Linking with unsafe C++ code
by Ahmed Nazeem
- 1 Replies
- Last post
by TaylorMichaelL
- I have made a C# application which links with another C++ project made using visual C 7.This C++ project is a dynamic library project that yields a .dll file.
I call the C++ functions which are public members of a class by defining an object of this class in the C# application and invoking its methods.
The problem is that when I make a release of the C# application it doesn't work on net fra
-
- How to convert an exponential number to non exponential number?
by Srikanth kannan
- 5 Replies
- Last post
by Matthew Watson
- Is there a way to convert an exponential number (held in string format) to non-exponential format without losing any precision in the number For example, I have a string variable containing "7.7583877127496407E-6" and I want to convert it to a string in decimal format. It seems that converting it using a double or decimal variable as an intermediate step to do the reformatting only prese
-
- Complex If and else statements
by MDog
- 6 Replies
- Last post
by OmegaMan
- I am currently working on a small game project and trying to figure out how I can compile some stuff I wrote by hand into C# code. Example of hand written info: If p > q, and distance between p and q is greater than 10 then b = 30 If p > q, and distance between p and q is greater than 14+ then b = 1 End of hand written info I understand how to work If, else, and switch statements, but I cann
-
- What is settings.settings?
by Jack Tripper
- 9 Replies
- Last post
by Jack Tripper
- i had a long post, but i lost it - so here's the abbridged version
What is settings.settings What is app.config
Is settings.settings a subset of app.config Is app.config a superset of settings.settings Is settings.settings a superset of app.config Is app.config a subset of settings.settings
Can the two get out of sync Does one override the other and therefore they are by definiti
-
- CompareTo
by Azurewrath
- 6 Replies
- Last post
by Azurewrath
- Hi all, Which of these 2 methods is a better/faster implementation: public int CompareTo ( object o ) { Box b = o as Box; if ( b != null ) { return numFaces.CompareTo ( b.numFaces ); } throw new ArgumentException ( "Object is not a Box Object" ); } public int CompareTo ( object o ) { if ( o is Box ) { Box b = ( Box ) o;
-
- Modules in C#?
by Ashour
- 4 Replies
- Last post
by OmegaMan
- HI all
I've used vb.net long time ago and i loved the type "Module" which allowed me to acesss some functions without having to create an instance of class, later when i moved to C# i thought it was missing, but now i found that there are some types like
"Vector3" in Mircosoft.DirectX namespace - i found that its methods are acessed without creating an object of it ,
-
- Naming Variables dynamically.
by mcmcom
- 1 Replies
- Last post
by CsharpNeophyte
- hi all
lets say i had this loop
for(int i=0;i<3;++i){ //Do Stuff here }
If i wanted to create a DateTime for each instance in my loop how can i name it
ex. In that loop i would like to construct 3 dateTime varialbes. All named dt1, dt2, dt3. using the loop to "fill in the end" of the variable name. is this possible
i tried
for(int i=0;i<3;+
-
- What is with all of the files for a simple program?
by conrarn
- 9 Replies
- Last post
by conrarn
- I posted this in the IDE section but got no reply so I am trying it here.
I am just learning C# and made a solution for a command line program. I would like to know what the heck all of these output files are for and can I somehow force them not to make subdirectories. I was able to remove the bin directory but not the obj\Debug etc. directory. Also don't understand the Test.vshost.exe file and
-
- What's the equivalent of MIN/MAX in C++(std), for C#
by Azurewrath
- 14 Replies
- Last post
by Azurewrath
- Hi,
I found Math.Min/Max, but they seems to be different. Is there an equivalent of them in C#
Thanks,
aw
-
- An unhandled exception of type 'System.FormatException'
by Lucy_H
- 9 Replies
- Last post
by Lucy_H
- Hi
I have developed an application and it has all been working fine up to now. The form loads fine but when I click a radio button to trigger the CheckedChanged event I get this error:
An unhandled exception of type 'System.FormatException' occurred in System.dll
Additional information: Input string was not in a correct format.
The error points to
Application .Run( new
-
- Continous annoying warning with my UserControl
by LonelyPixel
- 7 Replies
- Last post
by Figo Fei - MSFT
- Hi, I'm working with a UserControl in the VS2005 designer, and every time I modify something in the property grid, a warning pops up right into my view, saying that I need to rebuild the project to apply the changes in the designers that currently contain that control, or something like that. It's in German, Google has never seen parts of that message and the MSDN help link is broken. (It links to
-
- java.text.DecimalFormat in C#
by jbrito
- 2 Replies
- Last post
by Martin Xie - MSFT
- I'm converting a J++ solution to C#. I've migrating to C# with Visual studio 2005 assistant but I've some errors. I've difficulty with this one: //UPGRADE_ISSUE: Constructor 'java.text.DecimalFormat.DecimalFormat' was not converted. DecimalFormat formatter = new DecimalFormat("0000"); sNewV = new System.Text.StringBuilder(formatter.FormatLong(iPin)).ToString(); Anyone knows how should I
-
- Are nested classes generally Good Things?
by Sam Pearson
- 4 Replies
- Last post
by Sam Pearson
- If a class I have written is only used by one other class, is it generally good to nest it within the other class At first, I thought nesting classes made my code more confusing and hard to read, but according to http://java.sun.com/docs/books/tutorial/java/javaOO/nested.html , they provide "more readable, maintainable code." If this is the case, I will definitely try to nest classes wh
-
- Change Desktop
by Moh.Qwaider
- 1 Replies
- Last post
by ahmedilyas
- How can i change my desktop wallpaper.. in C# code
-
- True Copying Reference-Value Objects
by Skipy
- 4 Replies
- Last post
by frederikm
- I have stumbled upon the following problem:
Given an object (any reference-value class) O1, how can I copy it to another object O2.
O1 = O2; //will only copy the reference, but I want a new object being exactly identic to the old one.
Also, how can I do the same thing on an Array
int[] arr1, arr2;
arr1 = arr2;// also, doesn't work, only copies the reference
Hope I made my
-
- Q: Using the ThreadPool class
by kirchu
- 14 Replies
- Last post
by Sean Hederman
- Hello everybody. I have a little trouble using the ThreadPool class. The logic is the following. I have a class called Render and a method in it.
-
- error message: An object reference is required for the nonstatic field ....
by bruce027721
- 28 Replies
- Last post
by bruce027721
- I am getting the error 'An object reference is required for the nonstatic field, method, or property ' when I attempt to run my client application. I am not sure what is wrong and the documentation on this error (#CS0120) in the VS.NET IDE is confusing to me. Does anyone know what I am doing wrong MY code is below. People is a collection class and myPeople is obviously an instance of it. Because
-
- INI Reader fails to compile for debug check
by Zack Loveless
- 2 Replies
- Last post
by Zack "MathK1LL" Love
- This is my first post here, so I feel odd...But anyway: public class INI { [DllImport("kernel32.dll")] public static extern bool GetPrivateProfileString(string lpAppName, string lpKeyName, string lpDefault, StringBuilder lpReturnedString, int nSize, string lpFileName); public static string ReadINI(string File, string Section, string KeyName) { StringBuilder buff
-
- Unable to debug C# solutions
by J Hallam
- 14 Replies
- Last post
by J Hallam
- I'm using Visual Studio 2005 Pro. This problem is repeatable with archived code on backup discs as well as new solutions. When I attempt to run my apps in Debug Configuration with breakpoints, I get the message: the following module was built either with optimizations enabled or without debug information. D:\Programming\Solutions\******... To debug this module, change its project build configurat
-
- adding SQL db
by Danny Jr
- 2 Replies
- Last post
by awj100
- i have created a web app at www.syscpupower.com ,
I would like the results of the required feild to be saved to a sql database along with a date and time stamp. i have only created a sql database, do i need to create a table and how do i get the info from the feild into the database If you would like to see the code behind please reply to the post...
any assistance would be great!
Thanks
-
- Identifying Controls in a Form
by ugp
- 1 Replies
- Last post
by ugp
- I have created a normal Windows From.(Form1.cs) There i have created(draw) 2 lines. like this;
Code Snippet
private void Form1_Paint(object sender, PaintEventArgs e) { Graphics g = e.Graphics; Pen pen = new Pen(Color.DarkGray, 2); g.DrawLine(pen, 10, 20, 10, 700); g.DrawLine(pen, 210, 20, 210, 700); } Thats fine. what i want to do is; if i drag
-
- How to launch application from service on current user's desktop?
by Traps
- 14 Replies
- Last post
by Traps
- I have a service that I need to launch a forms application whenever a user logs in. This I have done, no problem, however if this user logs off using "switch user" instead of "log off", and then a new user logs in under a different account, my service will launch the application on the original user's desktop, instead of the new user's desktop. How can I fix this so that the ap
-
- Some conceptual questions
by ptenter
- 5 Replies
- Last post
by ptenter
- Hi,
I have some questions. I don't have adequate knowledge of OOPS concepts.
1) How to associate description with custom function, class, enum,property/method etc like as we can view .net property/method, we can see description for particular method/property etc while coding
2) How to make another copy (save as) of a winform Eg. I'm making another of form1 using save as after save I'l
-
- Controlling software using a custom built program.
by TMar
- 2 Replies
- Last post
by aoghsshebron
- I currently have a video capture program that runs on a remote server and brings in the data from two static cameras. I was told that the system has to be virtually autonomous in that he wants just an interface that will allow for the entering of the amount of time to be recorded and then press 'Start'. This means that I will have to have a program that can control the software remotely. It will b