Click here to Skip to main content
15,918,596 members
Home / Discussions / C#
   

C#

 
AnswerRe: how to get focus on textbox control in C#.NEt Pin
Sunil Wise11-Nov-07 23:22
professionalSunil Wise11-Nov-07 23:22 
QuestionUsing ConfigurationManager.AppSettings as a constant Pin
thestonefox11-Nov-07 22:39
thestonefox11-Nov-07 22:39 
AnswerRe: Using ConfigurationManager.AppSettings as a constant Pin
sedatkurt11-Nov-07 22:49
sedatkurt11-Nov-07 22:49 
GeneralRe: Using ConfigurationManager.AppSettings as a constant Pin
thestonefox11-Nov-07 22:55
thestonefox11-Nov-07 22:55 
GeneralRe: Using ConfigurationManager.AppSettings as a constant Pin
sedatkurt11-Nov-07 23:05
sedatkurt11-Nov-07 23:05 
AnswerRe: Using ConfigurationManager.AppSettings as a constant Pin
Justin Perez11-Nov-07 22:52
Justin Perez11-Nov-07 22:52 
GeneralRe: Using ConfigurationManager.AppSettings as a constant Pin
thestonefox11-Nov-07 22:55
thestonefox11-Nov-07 22:55 
AnswerRe: Using ConfigurationManager.AppSettings as a constant Pin
DavidNohejl11-Nov-07 23:07
DavidNohejl11-Nov-07 23:07 
thestonefox wrote:
mypath = ConfigurationManager.AppSettings["mypath"]


mypath cannot be constant. Constants are "baked" into assembly at compile time. Value from configuration file is taken at run time.


thestonefox wrote:
[DllImport(mypath+"mydll.dll", EntryPoint="runme", ExactSpelling=true, SetLastError=false, CallingConvention = CallingConvention.Cdecl)]


Also you can't do this, attributes are metadata, again compile time.

What Sedat said should work (I don't know if there is any way how to imperatively do dll import, you could try your luck with Google/MSDN on PInvoke).



[My Blog]
"Visual studio desperately needs some performance improvements. It is sometimes almost as slow as eclipse." - Rüdiger Klaehn
"Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe

AnswerRe: Using ConfigurationManager.AppSettings as a constant Pin
Rajasekharan Vengalil11-Nov-07 23:20
Rajasekharan Vengalil11-Nov-07 23:20 
Questionfileinfo class [modified] Pin
Sunil Wise11-Nov-07 22:33
professionalSunil Wise11-Nov-07 22:33 
AnswerRe: Is License Required Pin
Michael Sync11-Nov-07 22:33
Michael Sync11-Nov-07 22:33 
GeneralRe: Is License Required Pin
Michael Sync11-Nov-07 22:43
Michael Sync11-Nov-07 22:43 
QuestionCombobox Selected Value Pin
M. J. Jaya Chitra11-Nov-07 21:56
M. J. Jaya Chitra11-Nov-07 21:56 
AnswerRe: Combobox Selected Value Pin
Michael Sync11-Nov-07 22:12
Michael Sync11-Nov-07 22:12 
GeneralRe: Combobox Selected Value Pin
M. J. Jaya Chitra11-Nov-07 22:42
M. J. Jaya Chitra11-Nov-07 22:42 
GeneralRe: Combobox Selected Value Pin
Michael Sync12-Nov-07 0:52
Michael Sync12-Nov-07 0:52 
Questionhow to add webreferences dynamically in C#.net Pin
christefer11-Nov-07 21:36
christefer11-Nov-07 21:36 
AnswerRe: how to add webreferences dynamically in C#.net [modified] Pin
Pankaj - Joshi11-Nov-07 21:45
Pankaj - Joshi11-Nov-07 21:45 
QuestionShowing Images Pin
kingletas11-Nov-07 20:32
kingletas11-Nov-07 20:32 
AnswerRe: Showing Images Pin
Xmen Real 11-Nov-07 20:41
professional Xmen Real 11-Nov-07 20:41 
GeneralRe: Showing Images Pin
kingletas11-Nov-07 20:56
kingletas11-Nov-07 20:56 
GeneralRe: Showing Images Pin
Xmen Real 11-Nov-07 20:59
professional Xmen Real 11-Nov-07 20:59 
GeneralRe: Showing Images Pin
kingletas11-Nov-07 21:41
kingletas11-Nov-07 21:41 
GeneralRe: Showing Images Pin
Xmen Real 11-Nov-07 21:59
professional Xmen Real 11-Nov-07 21:59 
AnswerRe: Showing Images Pin
sindhutiwari11-Nov-07 21:00
sindhutiwari11-Nov-07 21:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.