|
Megidolaon wrote: Enough opinion?
Yeah, but my point was that an opinion isn't a research-tool for the lazy. I like red, but that opinion doesn't make red a "good" color for the walls or the ceiling. Asking generally for peoples' opinion because one is too damn lazy is like asking what color your ceiling should be. It should be red. Because I like red. The TS should avoid generics because his "research" (which consists of the collection of answers to his question, therefore our posted opinions) state that "red" is better than "generic".
Without the usual sarcasm;
I enjoy using generics as it increases my productivity, compared to handwriting strong-typed collections. It saves the time that is required to launch and execute CodeSmith, and I enjoy having a built-in collection over an external generated collection as reduces complexity and improves readability and maintainability.
I are troll
|
|
|
|
|
As good as they are, they don't go far enough.
|
|
|
|
|
i am developing a aplication in c#, and i need your reviews for my application, i am a chilean programer and i need a evaluation for my job, i am student of enginering of the informatic in first year.
here my aplication its name FastInfo.
http://rapidshare.com/files/202732805/FastInfo_Installer.exe.html[^]
thanks to all.
PD: sorry by my bad english.
modified on Thursday, February 26, 2009 5:39 AM
|
|
|
|
|
what this exe is??
and review you want for this??
|
|
|
|
|
1) Upload sourcecode, not binary. Executables are scary and may contain monsters and virusses.
2) A nice introduction to "FastInfo" would have been appreciated, so that one knows what you're getting into before you download.
So, where's the source, Luke?
I are troll
|
|
|
|
|
There is a bug in my application that on resizing Form it changes top,left position of user control on it. I have gone through all code and nowhere in my application i have written code to do this.
Is there any 'property' that does this?
Any help would be good.
Thanks,
AksharRoop
|
|
|
|
|
Check the Anchor property of that user control.. It should be set to top left alone to get it corrected as you wish
|
|
|
|
|
It worked.
Thanks a lot,
AksharRoop
|
|
|
|
|
Check the control's anchor property. You probably set it incorrectly.
"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
|
|
|
|
|
While downloading files from FTP-server through HTTP-proxy I've met the following problem: sometimes there are some zero bytes in the begin of the response (62 or 63 bytes),the end of the stream was truncated by the same count of bytes.
But the bug is not constant. If I try to download file without proxy, everything is fine.
What can be the reason of this problem and how to solve it?
Here is some code that I use to download files.
Uri srcURI = new Uri(SourceURL);
if (srcURI.Scheme != Uri.UriSchemeFtp)
throw new Exception("URL has invalid format");
FtpWebRequest webReq = (FtpWebRequest)(WebRequest.Create(srcURI));
webReq.Method = WebRequestMethods.Ftp.DownloadFile;
webReq.Timeout = 5000;
webReq.ReadWriteTimeout = 10000;
webReq.UseBinary = true;
webReq.UsePassive = true;
webReq.KeepAlive = false;
webReq.Proxy = proxy;
webReq.CachePolicy = new RequestCachePolicy(RequestCacheLevel.NoCacheNoStore);
try
{
FtpWebResponse webResp=(FtpWebResponse)(WebReq.GetResponse());
if (webResp.ContentLength == -1)
throw new Exception(string.Format("Can't download file: {0}",
WebReq.RequestUri.Segments[WebReq.RequestUri.Segments.Length - 1]));
string fname = WebReq.RequestUri.Segments[WebReq.RequestUri.Segments.Length - 1];
OnUpdateDownloadStatus(string.Format("Downloading file {0}", fname), -2);
string path = string.Format(@"{0}\{1}", DestFolder,
fname);
Stream fs = File.Open(path, FileMode.Create);
int cnt = 0;
using (BinaryWriter bw = new BinaryWriter(fs))
{
byte[] buf = new byte[ChunkSize];
using (Stream s = webResp.GetResponseStream())
{
do
{
if (AbortDownload)
throw new Exception("Downloading was canceled");
cnt = s.Read(buf, 0, ChunkSize);
bw.Write(buf, 0, cnt);
int percent = (int)(bw.BaseStream.Length * 100 / webResp.ContentLength);
OnUpdateDownloadStatus(
string.Format("Downloading file {0} : {1} %", fname, percent), percent);
}
while (cnt > 0);
}
}
}
catch (Exception exc)
{
StatusMessage=exc.Message;
}
finally
{
if (webResp != null)
webResp.Close();
OnDownloadComplit(StatusMessage);
}
}
modified on Thursday, February 26, 2009 6:33 AM
|
|
|
|
|
I found the decision here!!! So, Thank's for codeproject!
|
|
|
|
|
Dear All,
I have a DLL with method signature like this :
void printname (char* name)
I tried using the following code to to make use of my method:
-----------------------
string s="abc.xml";
char[] b = new char[100];
s.CopyTo(0,b,0,20);
unsafe {
fixed (char* p=b);
printname(p);
}
------------------------
but it seems not working....
can anyone give me some hints ??
Thanks,
Leslie
|
|
|
|
|
(char* name) Means it is a single char right ? or else it should be
(char** name) if it is an array. May be it needs the first Position.
try s[0] where s is a string in your case
|
|
|
|
|
MSDN[^]
another reference : MSDN[^] Last modified: 18mins after originally posted --
|
|
|
|
|
You don't need the char array.
char* tends to be strings, you may be able to pass a .net string in directly.
Otherwise, maybe fixed (char* p=s)
Plus you shouldn't have the semi-colon after the fixed statement.
|
|
|
|
|
Dear All,
You have be soo helpful !! I let you know which one is working as soon as get back from home !!!
Regards,
Leslie
|
|
|
|
|
hi,
how i can know the username of each process on pc like username in the task manager in c#?
|
|
|
|
|
You can use System.Diagnostics.Process.GetCurrentProcess to get the list of process which are running, assign it to the "Process" class one by one and then you can find a whole lot of info about each process
|
|
|
|
|
Hi There
I am using encryption and decryption using RijandaelManaged algorithm.
When I write integer in plain form .It is occupying 4 bytes.
When I use encryption It is occupying 16 bytes.
Can anybody tell me why?
Your response will be apperciated
Thanks
|
|
|
|
|
Encryption makes it "bigger". If it didn't, it would be relative easy to crack.
A text that gets encrypted usually isn't the same size as the encrypted version.
I are troll
|
|
|
|
|
hi, how can i know -in C# code- what a process is doing in a specific moment, what the files opened by the process and in what order?
|
|
|
|
|
Dear friends,
i have to find a solution to capture the Text or image or any file that is getting printed.
is there any possiblity to do that in c#
any idea? usefull links?
note:
i have searched in the net, and i have got program called
SpoolfileReadertest.exe in this website that was in vb.net.
this program works for dot matrix printer.
and i have "Xerox Phaser 3117" printer for this printer that program is not working.
please tell me how to capture Printer content in all the Printers?
Thak You.
With Love
Joe.I
|
|
|
|
|
hello..
i have a 100 picture boxes in my forum from PictureBox1 ... PictureBox100
and i have to assign same image to all of them and change the image at runtime so i have to write the code for each picture box like
PictureBox1.Image="";
PictureBox2.Image="";
PictureBox3.Image="";
PictureBox4.Image="";
.
.
.
PictureBox100.Image="";
is it not possible to write like
for(i=0;i<=100;i++)
PictureBox[i].Image="";
i tried it but its not the correct format so how can it be down . thans
|
|
|
|
|
You cannot use "PictureBox[i]" unless it is indexed. the one like in old VB.
Better is to navigate through the control array.. Here you can use Controls[i] (according to C# Syntax) and check for the control type ..
Enjoy..
modified on Thursday, February 26, 2009 6:19 AM
|
|
|
|
|
controlArray[i] i dont get that if could explain a bit further it would be fine
|
|
|
|