|
Use ref and out keyword to return multiple values from function
return statement returns only single value.
|
|
|
|
|
the quick and dirty way:
public static Double[] Test(Double Val1, Double Val2, Double Val3)
{
Double Test_Val = Val1 + Val2 + Val3;
Double Second_Test = Test_Val % 2;
double [] arr = { Test_Val, Second_Test };
return arr;
}
Just to show you, you can return virtually anything, including Lists, Dictionaries, self made object (like the Pair example)
V.
|
|
|
|
|
|
Please am working on an application that use datagrid view but am looking for tutorial or code that i can use to insert,update record that i retrieved from the database.
|
|
|
|
|
|
Don't use short URL's. People have no idea where that URL is actually going.
|
|
|
|
|
|
I wanna know, is it possible to read windows 7 User account password from the windows registry?
|
|
|
|
|
A Reset Tool downloaded here[^].
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
I want to know can we write a piece of code in c# that gets it from registry or not?
even is the windows password saved in registry or not?
|
|
|
|
|
No.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
|
Kuthuparakkal wrote: Since a hash function is one-way, this provides some measure of security for the storage of the passwords.
..which means you can read the hash, but not the password.
Kuthuparakkal wrote: Boot with some instant (DVD) os and read it.
..and end up with useless data; it's not possible to get the key, decrypt the hash and find the matching password. You could wipe out the entire section with a tool, but that's about it.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
|
No hacker has the required resources.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
No, there are people out there who know how to get the hashes. After that, you have to brute-force dictionary attack the hashes to get the passwords which can take a considerable amount of time.
|
|
|
|
|
Not yet, as far as I know. At least, not if the password isn't short (or findable by a dictionary attack).
On XP and previous, it was trivial to crack that nice LM hash, but Vista+ doesn't store the LM hash anymore.
|
|
|
|
|
<pre lang="c#"></pre>Error 1 An object reference is required for the non-static field, method, or property 'ConsoleApplication_FileTest.Program.GetAverageSalary(string)' C:\Users\Dawn\documents\visual studio 11\Projects\ConsoleApplication_FileTest\ConsoleApplication_FileTest\Program.cs 98 24 ConsoleApplication_FileTest
<pre lang="c#"><pre>static void Main(string[] args)
{
Dictionary<string, double> averages = new Dictionary<string, double>();
string filename = "c:\\test.txt";
averages = GetAverageSalary(filename)
} </pre></pre>
=====================
<pre lang="c#"> Dictionary<string, double> GetAverageSalary(string filename)
{
... </pre>
|
|
|
|
|
Your method main() is static.
Your method GetAverageSalary() is not. So it MUST have an object instance of type Program.
But I suspect you might solve it by making GetAverageSalary() static. However that depends on what you are trying to learn.
|
|
|
|
|
How do I mae an object instance of type Program?
|
|
|
|
|
Xarzu wrote: type Program
Program prg = new Program();
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
..that's why I usually change it to a static class altogether.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
jschell wrote: So it MUST have an object instance of type Program
What's the use of doin' that?
I suspect GetAverageSalary should be in it's own (static?) class
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
|
Get used to a feeling of Deja Vu - this question comes up in many, many forms repeatedly.
Normally because the tutor is rubbish, or the student didn't pay any attention...
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|