|
led mike wrote: Beginners should be studying (student) Computer Science not doing projects in companies. You start with a general foundation in Computer Science and then more specific studies of Computer Programming. Once you have obtained minimal understanding you become an intern in a company where you study again under the supervision of experienced programmers. They would answer these types of questions for you.
Who ever told you that you don't need to study Computer Science to be a programmer was wrong.
Well I didn't study CS. I studied pottery and comparative literature in the Kotohoshi Indians.
And yes - my previous sentences are complete crap. If you want a career as a programmer, you need to start studying and then never stop - for the rest of your life.
|
|
|
|
|
turailakshmanan wrote: flatform
turailakshmanan wrote: urrent do a attendens project in a small compahy
Please Please do a favor to us, attend some evening classes that teaches basic English to kindergarten students.
turailakshmanan wrote: how to create employeelist in windows application..
There is something called a search engine[^].
"Sometimes the greatest journey is the distance between two people" - Nice quote from a Nice Indian Movie
|
|
|
|
|
I thought these were merely syntactical sugar offered by the 3.5 compiler, but would compile down to normal getters and setters that would work on the 2.0 framework. Yes, when I try and ‘down-grade’ a 3.5 project to 2.0, I get compiler errors for automatic properties. Is this just something I have to live with, or is there another way?<o:p>
|
|
|
|
|
Brady Kelly wrote: I thought these were merely syntactical sugar offered by the 3.5 compiler, but would compile down to normal getters and setters that would work on the 2.0 framework.
Interesting. Do you have an URL to something that says that?
led mike
|
|
|
|
|
|
Well first none of those URLs is "Documentation". Second I can't find any form of the phrase "down grade" in any of them so they don't seem to say what you are saying you think should happen. So what documentation did you read that made you believe that it would work that way?
Brady Kelly wrote: when I try and ‘down-grade’ a 3.5 project to 2.0
led mike
|
|
|
|
|
I thought you meant links to support my statement that automatic properties are syntactic sugar. Bert Smal, the first link, is a well regarded blogger and has quite a good explanation.
My downgrade issue is not that I thought everything would work when I downgraded, it's just something I tried, and I knew it would fail initially because of all the 'using Linq' statements, but I didn't think would fail on automatic properties because I didn't know changing the target changed the compiler. A replier on the DOTNET-CLR list tells me this can actually be done, but not in my scenario:
"I've used automatic properties happily from the 3.0 compiler to generate a 2.0 assembly and see no issue with that. Same goes with extension methods (provided you add a fake attribute in your class). <o:p> Of course you need to *target* 2.0 using the msbuild and compiler shipping in 3.5, otherwise it won't work." - Sebastien Lambla [seb@SERIALSEB.COM]
Pits fall into Chuck Norris.
|
|
|
|
|
Brady Kelly wrote: Of course you need to *target* 2.0 using the msbuild and compiler shipping in 3.5, otherwise it won't work."
Thanks Brady, I'm still using 2.0 and VS2005 so this is all very helpful to me when I move to 3.5 and VS2008 which I believe will be soon.
led mike
|
|
|
|
|
You'll love it! There are many new and fun ways to avoid writing code.
Pits fall into Chuck Norris.
|
|
|
|
|
Brady Kelly wrote: There are many new and fun ways to avoid writing code.
You could always go work at McDonalds to avoid writing code.
led mike
|
|
|
|
|
Actually I'm studying Law.
Pits fall into Chuck Norris.
|
|
|
|
|
I now actually have code that says that. The following code compiles and runs targeting 2.0:
class Program
{
static string MyName { get; set; }
static DateTime MyDob { get; set; }
static void Main(string[] args)
{
MyName = "Brady Kelly";
MyDob = new DateTime(1969, 12, 13);
Console.WriteLine(MyName);
Console.WriteLine(MyDob.ToString());
}
}
Pits fall into Chuck Norris.
|
|
|
|
|
They are syntactic sugar. When you downgrade a 3.5 project to 2.0, you get the C# 2.0 compiler which doesn't understand them.
Calling it ".NET 3.5" made people expect that there was a new runtime. There isn't. The CLR is still version 2.0.50727 (although SP1 is required). Windows Forms is unchanged. .NET 3.0 was pure extensions, "3.5" ships with service packs for .NET 2.0 and WinFX.NET 3.0 to add a few new features to the assemblies which shipped in those versions.
As long as you don't use any of the new ".NET 3.5" libraries, or compiler features which require runtime support in the new libraries (e.g. LINQ), your code will still run against .NET 2.0, even if you're 'targeting' .NET 3.5.
Visual Studio 2008's "multi-targeting" is a sham. It's really targetting the same runtime throughout. It doesn't offer the ability to target .NET 1.1, which would have been really useful.
DoEvents: Generating unexpected recursion since 1991
|
|
|
|
|
Mike Dimmick wrote: It doesn't offer the ability to target .NET 1.1, which would have been really useful.
Why? Is there any compelling reason to not upgrade to 2.0?
Pits fall into Chuck Norris.
|
|
|
|
|
The reason why Microsoft didn't add .NET 1.1 targeting is because Microsoft wants more money. .NET 1.1 is still needed for older systems (school computers) that may not be as up-to-date as they should be.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
It's a feature of the C# compiler. If you're targetting .NET 2.0 with VS2008 then you can use automatic properties. These can run under .NET 2.0 but if you cannot compile the same source code in VS2005 because it doesn't support automatic properties.
|
|
|
|
|
Is there a way to use a generic dialog to prompt the user for report parameters using .NET RDLC reports? The ReportParameterInfo class contains properties such as "Prompt", which leads me to believe something should exist, but I can't seem to find it!
I remember doing something like this in Crystal Reports, but I can't seem to find anything similar using plain .NET.
I could probably write my own generic dialog, passing in a ReportParameterInfoCollection and displaying the appropriate controls for the user to enter the report parameters, but it seems like something like this should already exist. If it doesn't, then I might just write one and submit it as a new article, but I don't want to waste time re-inventing a wheel that I can't find!
Thanks.
|
|
|
|
|
Hi,
I want to do simple thing but I can't and I'm confused. I want to send a simple at command to my modem.
like atdt8889653
SerialPort s = new SerialPort("com3", 2400, Parity.None, 8, StopBits.One);<br />
try{<br />
s.Open();<br />
s.Write("atdt8889653");<br />
...<br />
}<br />
catch<br />
{<br />
...<br />
}
but it seems it doesn't work because my modem doesn't call;
my apps is win form
I see this code
http://www.dreamincode.net/forums/showtopic35775.htm[^]
but it doesn't work.
(I can connect to my modem via hyper terminal and type at commands and get correct responces)
|
|
|
|
|
Hi,
Do you need to append a carriage return to your command strings? HyperTerminal would do this when you press the enter key.
Alan.
|
|
|
|
|
Thanks a lot.
Yes I must add carriage return to the end of the string (+"\r").
|
|
|
|
|
Hi,
a wild guess: your modem needs hardware handshake, and you did not enable it for COM3.
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- 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 PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
Hey everyone.
My main goal, is to sign a message with a smartcard, without raising a dialog for the pin.(C#, .NET >= 2.0).
From the example provided in:http://msdn2.microsoft.com/en-us/library/system.security.cryptography.cspparameters.aspx
I have managed to disable pin dialog raise.
With the following code, i dont need to input the pin and all went ok.
CspParameters csp = new CspParameters(1, "Datakey RSA CSP");<br />
csp.Flags = CspProviderFlags.UseDefaultKeyContainer;<br />
<br />
System.Security.SecureString pwd = new System.Security.SecureString();<br />
pwd.AppendChar('1'); pwd.AppendChar('2'); pwd.AppendChar('3'); pwd.AppendChar('4');<br />
csp.KeyPassword = pwd;<br />
<br />
csp.KeyNumber = (int)KeyNumber.Signature;<br />
<br />
RSACryptoServiceProvider rsa = new RSACryptoServiceProvider(csp);<br />
<br />
byte[] data = new byte[] { 0, 1, 2, 3, 4, 5, 6, 7 };<br />
<br />
Console.WriteLine("Data : " + BitConverter.ToString(data));<br />
<br />
byte[] sig = rsa.SignData(data, "SHA1");<br />
<br />
Console.WriteLine("Signature : " + BitConverter.ToString(sig));<br />
<br />
bool verified = rsa.VerifyData(data, "SHA1", sig);<br />
<br />
Console.WriteLine("Verified : " + verified);
Now i want to do the same thing with the example provided in:
http://msdn2.microsoft.com/en-us/library/bb924544.aspx
Meaning, i want to create a CmsSigner passing it the correct CspParameters, in order to sign the pkcs7 message with the smartcard without raising a dialog box for the pin.
something like:
static public byte[] SignMsg2(Byte[] msg, X509Certificate2 signerCert, bool detached)<br />
{<br />
ContentInfo contentInfo = new ContentInfo(msg);<br />
<br />
SignedCms signedCms = new SignedCms(contentInfo, detached);<br />
<br />
<br />
CspParameters csp = new CspParameters(1, "Datakey RSA CSP");<br />
csp.Flags = CspProviderFlags.UseDefaultKeyContainer;<br />
<br />
<br />
System.Security.SecureString pwd = new System.Security.SecureString();<br />
pwd.AppendChar('1'); pwd.AppendChar('2'); pwd.AppendChar('3'); pwd.AppendChar('4');<br />
csp.KeyPassword = pwd;<br />
<br />
csp.KeyNumber = (int)KeyNumber.Signature;<br />
csp.Flags = CspProviderFlags.NoPrompt;
<br />
CmsSigner cmsSigner = new CmsSigner(csp);<br />
<br />
cmsSigner.IncludeOption = X509IncludeOption.EndCertOnly;<br />
<br />
signedCms.ComputeSignature(cmsSigner, false);<br />
<br />
return signedCms.Encode();<br />
}
This does run, but has 2 major issues:
- it still asks for the pin;
- when i putt the correct pin, the message is signed and encoded (the function runs till the end), but the pkcs7 message that is returned, is wrong: in my example, i use this to sign a pdf, and it says something like: "PKCS/ Parsing error: Incorrect version";
Anyone as any input on this subject?
Really Apreciate.
Regards
|
|
|
|
|
Any1 has any input on this subject?
Really am desperate...
regards.
|
|
|
|
|
The select command selects the INBOX,DRAFTS and other folder, however it fails to select 'sent items' folder because of the space in the mailbox folder name.
How to select the Sent Items folder?
|
|
|
|
|
Try Select "Sent Items" or Select "Inbox.Sent Items".
|
|
|
|