|
|
you should not use split method as it causes to create string array object
if your requirement is only to return filname without extension the
use this
return new Path.GetFileNameWithoutExtension(s);
Happy Coding
Deep
|
|
|
|
|
thats the way I like but there is no need for new keyword
PS Good Answer BTW
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
-----------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
oh thats rights!!!!!!!
thanks for comment........
I guess even no need of the "the" at the end of s econd line
thanks for comment again!!
|
|
|
|
|
SaveTigers wrote: I guess even no need of the "the" at the end of s econd line
hehe yeah thats right too
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
-----------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
You really question a lot of simple and basic questions here. Although this is not a real problem, you should try and buy a book and read it.
Also: all your messages are turned grey, this is because people think your questions are bad. If you see red messages, people think it is a good question or anwser.
|
|
|
|
|
I second that.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
Use System.IO.Path.GetExtension(filename) , and you'll get ".zip". There are also methods for getting the filename, or the directory.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
HI,
I am using asyncrouns socket and the application connects it to another application. but the requirement is, if my apllication gets discionnected due the failure of previous aaplication when the other application starts up , my application should connect the application as soon as the user clicks on the dialog which is shown at the time of disconnection.
but i am encountering this exception:
the undo operation encountered a context that is different form what was applied in corresponding set operation. the possible cause is that a context was set on the thread and not reverted (undone)
can any one help it
|
|
|
|
|
|
hmmm..looks like a Tongue Twister problem
"Don't worry if it doesn't work right. If everything did, you'd be out of a job." (Mosher's Law of Software Engineering)
|
|
|
|
|
I've got an interesting issue here, where I am not sure how to tackle it. So if you have some input for me, it's appreciated.
What is the issue?
I am working on a new component, which calculates stuff and does some other things. It's not that important what it does for this issue. This new component is programmed in C# on .net 3.5.
This new component is meant to replace an old component in the currently widely deployed application. This current application is programmed in VB6 and is an application with a number of COM+ components.
One of those components is the DataManager which handles all access/traffic to and from the database, this is a COM+ component.
Now, this is where I'm having some difficulties. This datamanager expects 3 parameters: connectionstring, function to be called and last but not least, a propertybag to put the results in. My new component has to use the datamanager for data retrieval.
So here I am, in .net I don't have a propertybag, and the methods are called like:
_werknemerBO.FetchData(_connectionString, "WnWithWndnstvb", ref data); // data is an empty propertybag, WnWithWndnstvb is the method to be called.
I'm no VB6 coder, I can only read it. But is there a robust solution how I can get this solved elegantly? I can't change the datamanager-code, since that component is used by other parts of the application. In .net I have the free hand to get it working.
Any suggestions plz, thanks.
The consumer isn't a moron; she is your wife.
|
|
|
|
|
You could try looking at this[^] article, to see if it gets you at least started.
I found this by googling 'propertybag'. You could try that, if the article above doesn't help you. It just seemed closest of the first page to your question.
Good luck!
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hello,
I want to ask if anybody know how to render (show) image really fast. Because if I override OnPaint in user control and I use GDI+ function drawImage it is really slow for bigger images (2000px x 1500px) especially on my EEE notebook, and redrawing image when main menu disappear is terrible slow.
|
|
|
|
|
Split the large image up into smaller images, and only draw the ones that overlap the invalidated region when the menu disappears
|
|
|
|
|
|
Hi,
here are some ideas:
- if the destination's resolution is different from the image one, your image is getting rescaled; you could cache the image at the right size, that would speed up the repaints.
Example: Bitmap bm2=new Bitmap(bm1, destSize);
- if the image has to come from disk and is compressed (e.g. JPEG) it may be worthwhile to keep an uncompressed copy (say a BMP); the file would be larger, painting it could be faster.
- even without chopping it up into subimages, you could just repaint the part that needs repainting by using one of the more complex overloads of DrawImage().
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
I wanna include the images in my windows form where am doing globalization. Normal Label,textbox values are working perfectly but am clueless abt including image
|
|
|
|
|
Does this mean that you require different images for each language?
It is not really clear from your OP.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
I have the following situation:
- A Timer tick event handler that puts some data on a queue
and sets a manualresetevent.
- A background thread (an infinite loop) that sends the data in the queue to some devices.
-> if the queue is empty, the thread uses manualresetevent.Reset()
to block this thread on manualresetevent.waitone()
-> if the queue is getting to long, the older data is considered obsolete
and just thrown away.
Using the multimediatimer makes the timing more accurate,
but if the background thread is blocked and I use manualresetevent.set().
how long wil it take the background thread to continue?
15-20ms? Is there a way to improve response time?
15-20ms is not a big issue, but faster is always better
(note: the background thread is just a regular thread, not a backgroundworker)
|
|
|
|
|
You should be seeing a delay in the order of 10x10-6s because you are incurring a context switch. This is roughly how long the windows takes to schedule a thread and resume running it on a CPU. If you are seeing 10x10-3s, this is a quantum and will occur if you are running too many threads for the number of cores in your machine.
The only way to speed this up is not to put your thread in a wait state in the first place. If the delay is really too long, you can try spinning the thread instead of using a wait. This of course has one big drawback: you will be using one core all the time, most of it wasted.
Nick
----------------------------------
Be excellent to each other
|
|
|
|
|
Hi.
I have a string ( e.g "Regex" )
Now I want to find the equal class with its name , if exist (programmatic).
Actually, I'm going to create a simple colorize code editor !
Could you guide me ?
Thanks a lot.
|
|
|
|
|
well.... number of ways to proceed....
here one...
1.Set the name of the class exactly as you want (Note: this will be the key)
2.Get the types available in the executing assembly.
by
Assembly myAssembly = Assembly.GetExecutingAssembly();
3.Then iterate on each type and compare it with your string and do whatever...
like
foreach (Type mytype in myAssembly.GetTypes())
{
if(mystring == type.Name)
{
}
}
if yo have 10 class types in your assembly all of them will be listed and you can use it further.
Have a Happy Coding.....
|
|
|
|
|
King Julien wrote: 1.Set the name of the class exactly as you want (Note: this will be the key)
It means , I have to set the name in a string manually ?
Sorry , I'm novice in Reflection
|
|
|
|
|
Not actually.
You can have any name for the class as you want. And you can check and compare any string with the available types(i.e. the classes)
for e.g,
if your string is blue, then if a type (class) with the same name is available i.e. A class called blue then the condition is validated. Thats why i meant that the string is the keyword.
Note Case sensitive issues can be solved by parsing.)
Have a Happy Coding.....
|
|
|
|