|
Hi Everybody!
This is the first time I'm trying to export a class to dll, to be used by others.
I created 2 classes, one of the is the Main class (that I want people to create object of that class, and use its methods), and there is a Second class that helped me create the Main class.
The thing is that I when someone refers to my dll from his/her project he/she can see the Second clas in the dll's namespace. I want it to be invisible to the user who creates a reference to my dll, or at least that no one will be able to use it or create objects out this class.
Thanks!
|
|
|
|
|
Green Fuze wrote: or at least that no one will be able to use it or create objects out this class.
That's what the internal keyword is for.
internal class NooneWillEverUseThisClassFromOutside
{
public static int foo = 0;
}
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Thank!
|
|
|
|
|
HI
Guys let me know one thing how to capture the data eneterd by the user through key baord in C# , e.g. if the user presses the A key of key board so i can access the A in my code for use, please consider guys i want to do this in windows service.plz reply ASAP,
thankx in advance
|
|
|
|
|
what are u trying to do? a key logger? (:
|
|
|
|
|
yup man i would like to do some thing like that.
|
|
|
|
|
Processing keyboard inputs is part of UI, which should be separated from the service. You'll find many limitations if the service is handling UI, mainly because the service can run outside any login session. A better design would be creating a little UI to handle user inputs. The service and UI communicate via IPC.
Best,
Jun
|
|
|
|
|
Thankx man , but there will be no UI , i just want to capture all the data entered by the usder , e.g. if any user enters his/her E-mail ID and password , my window service should save this e-mail and password , and this service will be running at the back end , plzzzzzzz reply me sooon ,
regards,
tippu
|
|
|
|
|
King Shez wrote: e.g. if any user enters his/her E-mail ID and password , my window service should save this e-mail and password , and this service will be running at the back end , plzzzzzzz reply me sooon ,
We will not help you write software that conducts illegal activity, or for which illegal acivities would be its prime reason for being.
|
|
|
|
|
Hi,
When I compile mu class the .dll file is put into a bin/debug folder. How do I get this .dll file to get put in this, and into another direcotry (only the .dll file, and not the accompanying .xml files?
Another question, why does C# Express compile the same class file, but the size of the dll is smaller in size, plus it puts this file into a bin/release folder.
What is the difference in the debug and release folders??
Regards
ma se
|
|
|
|
|
In the project properties under "Build" you can change the "Output Path" to any path you like.
The default is bin\Debug resp bin\Release
The difference between Debug and Release builds is, that debug builds contain, uhm, debug information.
When your app crashes you get way more details where and why it crashed, instead of a "SomeStrangeException". You can also use the VS Debugger to watch the values of your variables, step through/over the code and some other stuff.
The release build is the binary you ship to your customers, it contains only very few debug information.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Thanks!
So if I were to change the folder to Release, will the compiler know to leave out the debug stuff?? Or is there settings that I need to change.
Is there a way of specifying the debug dll to the debug folder, and the release dll to the release folder, or can you only set 1 directory at a time??
ma se
|
|
|
|
|
In the toolbar of the VS IDE there's a combo box where you can switch between "Debug" and "Release" mode.
Open the project properties and change the value in the combobox from Debug to Release and vice versa.
You will see that the values of the properties will change.
If you want to leave out debug information, just switch to Release mode throuh the combobox in the toolbar.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Dear All,
I'm Working on Application to download files from web
this application should be Desktop application (.exe)
Thanks for your help and support
regards,
Charbel Asmar
|
|
|
|
|
I'm missing a concrete question.
modified 12-Sep-18 21:01pm.
|
|
|
|
|
I wish you good luck!
|
|
|
|
|
ROTFL
Regards
|
|
|
|
|
|
I want to read the security key value from App.config file. Below is the procedure which I did :
Create a new config file name as App.config
In the App.config file:
Added this:
<appsettings>
<add key="SecurityKey" value="MyNewKey">
After that I did the following:
System.Configuration.AppSettingsReader settingsReader
= new AppSettingsReader();
when i am debugging these, i find that the value of dimension is 0 which supposed to 1. since there is one key-value present in the App.config
string key = (string)settingsReader.GetValue("SecurityKey", typeof(String));
Also it's throwing an exception stating
“The key "SecurityKey" does not exist in the appSettings configuration section”.--which already present in the App.config.
Also i tried with the second scenario:
string key =
System.Configuration.ConfigurationManager.AppSettings["SecurityKey"];
which giving me the key value null.
Do i required to do some setting for reading the "SecurityKey" Value?
Needs help!
Thanks
Sudhir Kumar
Sudhir Kumar
|
|
|
|
|
Sudhir,
Since I am unable to see your app.config file I am assuming this:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="SecurityKey" value="SecurityKeyVALUE"/>
</appSettings>
</configuration>
C# Code:
string key = System.Configuration.ConfigurationSettings.AppSettings["SecurityKey"].ToString();
This should work without any problem.
Regards,
Bhupesh.
|
|
|
|
|
Posting the question once and only in one forum will get you answers.
Posting more than once and to different forums will get you ignored.
only two letters away from being an asset
|
|
|
|
|
Hi to all,
In my DataGridView, I have 1st Column as "Unique-ID", which must be unique.
And the DataSource to the DataGridView is an XML File ( containing 'Unique-ID' in numeric & 'ID-Detail' in text format which is shown in DataGridView).
I want to sort "Unique-ID" Column on 'ColumnHeaderClicked' event in numeric format not in string format. What should I do for that?
Plz., guide me.
Thanks & Best Regards,
Aniket Salunkhe
|
|
|
|
|
I want to read the security key value from App.config file. Below is the procedure which I did :
Create a new config file name as App.config
In the App.config file:
<configuration>
<appsettings>
<add key="SecurityKey" value="MyNewKey">
After that I did the following:
System.Configuration.AppSettingsReader settingsReader
= new AppSettingsReader();
when i am debugging these, i find that the value of dimension is 0 which supposed to 1. since there is one key-value present in the App.config
string key = (string)settingsReader.GetValue("SecurityKey", typeof(String));
Also it's throwing an exception stating
“The key "SecurityKey" does not exist in the appSettings configuration section”.--which already present in the App.config.
Also i tried with the second scenario:
string key =
System.Configuration.ConfigurationManager.AppSettings["SecurityKey"];
which giving me the key value null.
Do i required to do some setting for reading the "SecurityKey" Value?
Needs help!
Thanks
Sudhir Kumar
Sudhir Kumar
|
|
|
|
|
Hey guys
my little "robot application" is coming along nicely now, but ive hit ANOTHER wall lol
basically i want to wait until a certain Edit field comes back into focus on a different application running on windows... Ive tried using Win32.GetFocus() to return the handle to the currently selected window, but that only seems to work for the calling thread...
Win32.GetForegroundWindow() allows me to get the handle to the current application, however i need the Edit field that is current focused (has the cursor in ready for input)...
is there any other way of finding this out from a differnent application sat in the system tray?
Cheers!!
Will
|
|
|
|
|
hi all,
when a user attempts to close my application,i show him/her a confirmation messagebox. (with YesNo options.
but the problem is: the X (close cross) button on the right up corner is disabled.
why ? why is that button disabled ? and how can i make it enable again ?
cos the user should both press No or that X button not to exit the program ?
Thanks in advance, bye.
MFA
|
|
|
|