|
Arun kumar Gautam wrote: class b:a
That makes all the difference.
b.Add overloads a.add as:
- Both methods are available from type
b . - Both methods have the same name
b.add has a different input signature
“Education is not the piling on of learning, information, data, facts, skills, or abilities - that's training or instruction - but is rather making visible what is hidden as a seed” “One of the greatest problems of our time is that many are schooled but few are educated”
Sir Thomas More (1478 – 1535)
|
|
|
|
|
thnks for answer it make my concept completely clear.... thnks for this
|
|
|
|
|
No Problem.
“Education is not the piling on of learning, information, data, facts, skills, or abilities - that's training or instruction - but is rather making visible what is hidden as a seed” “One of the greatest problems of our time is that many are schooled but few are educated”
Sir Thomas More (1478 – 1535)
|
|
|
|
|
Overloadings can be overridden, but that requires inheriting a class/interface that already has the overloadings defined. You can also overload without inheriting from another class. However to Override you need to inherit from another class that already has the method with a signature defined.
|
|
|
|
|
I'm using "user" level settings to store the configuration of my application (main form size / position, user selected display options etc.) I can save changes using:
Properties.Settings.Default.Save();
This is all well and good, however at any opportunity the system creates a new file with the default setting vales. So on a development PC I get different settings for debug and release versions of the application, different settings for different users and the biggest problem the default setting every time the application version number is changed!
Is there anyway to specify the file name / path used for the users settings so that I can have just one file on each machine and so that the users does not have to re-configure the application every time the software is updated.
James
|
|
|
|
|
http://msdn.microsoft.com/en-us/library/system.configuration.applicationsettingsbase.upgrade.aspx
|
|
|
|
|
Upgrade is of no use.
It does no allow you to specify one file for all users / copies of the application.
It also sets all of the properties back to their defaults every time the application runs.
|
|
|
|
|
1) Why would you have a single configuration file for every user? Windows is a user based OS. Every user should be able to configure the application how they like. You have default common options like paths and stuff, but layout, window positions, usernames / passwords are all unique to a user.
2) The .config file goes in a directory in the user application data folder. So each user gets their own copy.
3) The path to the .config file is based on the executing EXE as well as the version #, so if you change the EXE (i.e. running in the debugger) or the version #, you'll get a different folder and thus the options will be "reset"
4) The Upgrade method will handle a version # change, it will not handle the EXE change or user change.
|
|
|
|
|
We provide turn-key systems, where several users may use the product on a single PC. They MUST all have the same configuration (customised for each site) each site will have several PCs with the software each configured the same so any user can use any computer.
It would be good to have the config file on a central server accessed by all PCs, an alternative (for some sites) will be a single configuration on each PC as "supervisor" positions need a different configuration.
|
|
|
|
|
I think you are confused about the various types of settings.
There are USER SPECIFIC settings which are, you guessed it , specific to each user. These are things like window layouts, fonts, colors, option checkboxes, usernames, passwords, etc.
There are also APPLICATION SPECIFIC settings which are global application settings. These may OR MAY NOT be changed by the user.
It sounds like you are trying to jam APPLICATION SPECIFIC (that may NOT be changed) into the USER SPECIFIC settings infrastructure which is why you are not liking the result.
Use the application specific / read-only infrastructure instead. Store your configuration settings in the app.config file. Configuration \ AppSettings.
|
|
|
|
|
The settings need to be changeable via the application (so can't be application specific). They need to be in effect a mid point between application and user specific (computer specific?). It seams so simple years ago a simple .ini file would do this, even they registry can do this (though in a far more complex way) and now with .net you can't. It looks like a big step in the wrong direction yet again by microsoft with them trying to stop users (and programmers) being able to use their computers how they want.
|
|
|
|
|
Boris The Bold wrote: It looks like a big step in the wrong direction yet again by microsoft with them trying to stop users (and programmers) being able to use their computers how they want.
Ah, so you think that making the OS more secure is bad practice. It's thinking like this that makes Linux users mock Windows users.
If you want to be able to manage and administer your application to save application specific configuration, it's a simple matter to roll your own mechanism. All you need to do is create a file that represents the settings you want to save, and then serialize that out to a directory that sits under:
Environment.GetEnvironmentVariable(Environment.SpecialFolder.CommonApplicationData))
|
|
|
|
|
I'm sorry that came out a bit stronger than I meant.
It's just that I think that the person who bought the computer should control how and what they can do on it and not Microsoft.
It looks as it I will have to implement my own application settings system.
|
|
|
|
|
Boris The Bold wrote: I think that the person who bought the computer should control how and what they can do on it and not Microsoft.
Microsoft were slammed repeatedly for allowing this. They finally learnt their lessons and made the OS a whole lot more secure.
|
|
|
|
|
I would like to know who to accomplish the following goal using an existing C# 2008 desktop application.
I would like to take the C# run time input and output parameters and possibly put the calls into a batch file and or with some method you recommend. Here are the following I would like to complete:
1. I would like to run the C# 2008 desktop application and give it input parameters. (This is how the program currently runs.)
2. I would then like to wait for a response from the C# 2008 desktop application before proceeding to the next step. (The program needs to
wait since it is calling a web service and loading documents to the web service.) I need to make certain the response code call to the web service = 0.
3. Next step depending upon the response from the web service.
a. If the response from the web service = 0, then the C# 2008 desktop application is called again with parameters to close out the customer account on the web service.
Also under this step, the results for the second call to the desktop application should be displayed in a message the user can see.
b. If the response from the web service not = 0, then a message should be displayed to the user stating what the problem is. No further call is made.
Thus can you show me code and/or point me to a reference on how to accomplish this goal?
|
|
|
|
|
I would save configuration to an xml file, and then read from that. If it is real simple you can use an ini file, but that is probably considered obsolete.
|
|
|
|
|
Can you show me code on how to read the xml file? Would I write some C#.net code? Would I use a dos bat file to read the xml file? If so, how would you have the dos promnpt command read the xml file?
|
|
|
|
|
|
All of the different steps can be accomplished without restarting the program. Start with the input parameters as required and then use the results of the webservice to decide whether the program terminates or requests further input and restarts. The actual design will depend on how the input parameters are to be passed to the program.
Use the best guess
|
|
|
|
|
If you want to access functionality of your C# program from some kind of script, you may want to have a look at the Application Framework (namespace Microsoft.Samples.ApplicationFramework): that allows for sending requests to a running application.
|
|
|
|
|
dcof wrote: using an existing C# 2008 desktop application.
All of this depends on what the application does. Specifically HOW does the application take "input"? HOW does the application provide "output"?
|
|
|
|
|
I want code for video streaming in c#
can you help me
|
|
|
|
|
Talal H.Daoud wrote: can you help me
No, not without a more specific question. We can't give you the code for your whole project. You need to tell us what you've tried already and ask why that didn't work.
|
|
|
|
|
You need to be more specific. Do you want to create a windows app or a web app?
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Are you creating the stream server or the client side?
|
|
|
|