|
Hi,
Modifier internal means that we can only access that class from the same assembly.
"protected internal" cannot be applied on class. But it can be applied on members. This means two things. It is either derived classes or classes in the same file that can access that member.
Manoj
|
|
|
|
|
manojkumarrai wrote: "protected internal" cannot be applied on class
It can if the class is nested within another class.
Ian
|
|
|
|
|
Thanks Ian.
I have not tried it. Bit I will use it when I can.
Manoj
|
|
|
|
|
hi all,
i want to compare the two versions of same software to update the lower one with higher one,
i could get the current version which is already installed in clients system by using reflection and now wants to fine and compare the version wich is in server?
could able to download the version that is there in my website,
but here i've strucked coz, i couldn't able to check the software version which is in server.
i got the current application version by using system.reflaction namespace's getCurrentassembly.fullname() property
please tell me how to find version of application which is in server.
do i need to write any xml or anything is my msi/setup please help me
prashanth,
s/w Engineer,
Syfnosys.
|
|
|
|
|
I have a C# app that wraps windows media player to play some streaming audio. I need a way to determine the sound level of the stream (Not the volume level that media player is set to). Any one know how to do this?
sean
|
|
|
|
|
Hello everybody,
I hope someone will be able to help me with something I have come across.
What I want to do is to recognize a specific object in a picture. I will process the image and we will suppose that the image is taken from the same distance at a certain interval of time (let's say with a webcam).
Now, what I have done is extracted all the objects from an image using Andrew Kirillov's Image Processing Lab (it can be found here on codeproject). However, the Image Processing Lab extracts Blobs, which are formed of the object I am interested and it is placed in a rectangle.
What I want to do is to extract ONLY the object and I have no clue on how to do that. Does anyone have any ideas ?
After that I want to compare that object with another one extracted from another picture.
Is there a way of comparing two pictures and searching for a certain object?
I guess I am looking for a simple shape recognition algorithm.
Please guide me on this,
Thank you very much,
OviDeus
|
|
|
|
|
Short and skinny version.
I am creating a application that will copy files from one location to another. There will be an option that allows the user to automatically delete the destination folder after a specified number of days. Before implementing this functionality I have been trying to delete the directory by hard coding the destination path. But each time I do only the files are deleted and the folders are left behind and I'm left with a IOException, telling me that access to the specified path is denied.
Any thoughts?
Freedom is the right to say that 2+2=5 if this is so everything else will follow.
|
|
|
|
|
There is an overloaded .Delete method that allows you to delete all subdirectories as well.
|
|
|
|
|
I have set the recursive to true:
DirectoryInfo asdf = new DirectoryInfo(temp.getDestination());
try
{
asdf.Delete(true);
}
catch(IOException d)
{
MessageBox.Show(d.ToString());
}
The folder that I am trying to delete contains a folder, which contains another folder, which contains another folder, which contains 12 files. The 12 files get deleted but the folder that contains the 12 files is the folder that the exception says access is denied on.
Freedom is the right to say that 2+2=5 if this is so everything else will follow.
|
|
|
|
|
Hi,
Try to delete the folder using "DirectoryInfo.Delete(true)" function. Please note that you need to provide the parameter as "true" so that even if there are files and sub-folder in that particular folder, they all will get deleted.
Manoj
|
|
|
|
|
I have tried this.
Thanks for the suggestion though. I just don't get why something so simple is causing me so much hassle.
The folders that I am trying to delete have been copied by my application.
Freedom is the right to say that 2+2=5 if this is so everything else will follow.
|
|
|
|
|
Try checking if any of the files in the folder are left open.
|
|
|
|
|
Got it!
Nothing to do with open files or folders.
When I was copying form on the source to the destination I needed to specify Access Control:
if (!Directory.Exists(Dst))
{
Directory.CreateDirectory(Dst);
System.Security.AccessControl.DirectorySecurity asdf = new System.Security.AccessControl.DirectorySecurity(Dst, System.Security.AccessControl.AccessControlSections.All);
}
Freedom is the right to say that 2+2=5 if this is so everything else will follow.
|
|
|
|
|
Thanks to everyone for their suggestions. They were greatly appreciated .
Freedom is the right to say that 2+2=5 if this is so everything else will follow.
|
|
|
|
|
If
MicealG wrote: access to the specified path is denied
then are you sure that the directories/files aren't Read Only or being used by another application?
That's always the first thing that comes to my mind whenever something tells me access to a file is denied.
|
|
|
|
|
hi all,
i am going to give update feature to my client, and for that i kept all the updated files(latest version) in my Website's Path and now i want to download that files in to the local machine(what ever may be the machine--i mean wat ever may the client is using),
for this i gave one buttion saying Update, whenever the client click on Update i need to check latest version which is available on my Website and need to download that in to his local system and update.
Please any suggestions
help me
thnx in advance
prashanth
|
|
|
|
|
|
thank you led mike,
but i have used it and left with no result,its working fine for sample applictions and not to main applications(which is having many dependancies) i couldn't able to find out the reason too.
comming to my requirement as an alternative
i could able to download the version that is there in my website,
but here i've strucked coz, i couldn't able to check the software version which is in server.
i got the current application version by using system.reflaction namespace's getCurrentassembly.fullname() property
please tell me how to find version of application which is in server.
do i need to write any xml or anything is my msi/setup please help me
prashanth,
s/w Engineer,
Syfnosys.
|
|
|
|
|
pashitech wrote: couldn't able to find out the reason too.
Have you researched Click Once? There is plenty of information about it, books even.
http://msdn2.microsoft.com/en-us/library/ms996413.aspx
http://windowsinstaller.info/pages/en/clickonce.htm
led mike
|
|
|
|
|
I've got a stringbuilder object back from a dll for which i don't have the source by using an API call. The api call is a blackbox I have no idea what happens inside it.
Inspecting the stringbuilder in VS shows the same result as inspecting the output in the VB6 app i am trying to copy.
I now need to perform a bitwise mask on each of the bytes in the stringbuilder as that is what the original app does.
How can i get a byte array of ASCII values out of a string builder?
I've tried these 2 approaches:
Encoding enc = Encoding.ASCII;
byte[] bytes = enc.GetBytes(text.ToString());
This overflows value bigger than unsigned byte...
for (int i = 0; i < text.Length; i++)
{
Console.WriteLine(text[i] + " " + Convert.ToByte(text[i]));
}
this produces output that doesn't seem to bear much relation to the input data.
I've tried these 2 approaches:
this produces output that doesn't seem to bear much relation to the input data.
Encoding enc = Encoding.ASCII;<br />
byte[] bytes = enc.GetBytes(text.ToString());
This overflows value bigger than unsigned byte...
for (int i = 0; i < text.Length; i++)<br />
{<br />
Console.WriteLine(text[i] + " " + Convert.ToByte(text[i]));<br />
}
Has anyone played with string compatability between VB6 and c#?
Russell
-- modified at 11:34 Thursday 17th May, 2007
|
|
|
|
|
Russell Jones wrote: This overflows value bigger than unsigned byte...
WHat does? I see nothing wrong with you use of Encoding.ASCII.GetBytes(string) it works fine for me.
led mike
|
|
|
|
|
sorry, it doesn't look like it did when i typed it. That comment should have been attached to the code below it. The ASCII encode was giving me values that weren't the same as the old skool VB6 Asc command. (oops no i've attached the wrong comment to each piee of code)
I've used the Microsoft.VisualBasic.Strings.Asc function now and i'm getting the results i need.
Thanks for the reply.
Russell
|
|
|
|
|
Hi,
I have been asked to take a seminar of 30 minutes on advantages of Microsoft .NET framework 2.0. Our company is currently using framework 1.1, so they want me to tell them in my seminar whats the advantage of moving to Framework 2.0.
I have to take this seminar on this friday (18 - May), can someone provide me some resources or more information on this. I dont have access to google here, but have access to code project, msdn and some .NET related web sites.
Regards,
Blumen
|
|
|
|
|
generics
anonymous types
ASP.NET 2.0 is better
nullable types
anonymous methods ( although these are not so great, and have potential for misuse )
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Which of the above can be included in a 30 min session. Could you please point me to a resource on a topic which you would recommend
|
|
|
|