|
In much of the code I have seen (on SO, thecodeproject.com and I tend to do this in my own code), I have seen public properties being created for every single private field that a class contains, even if they are the most basic type of get; set; like:...
Started by Callum Rogers on
, 13 posts
by 13 people.
Answer Snippets (Read the full thread at stackoverflow):
However public, private answers, nobody has ....
This:
private int age; public int Age { get { return age; } set { age = value; } }
This makes with it, but it is there, and if you need to get fancy you just spell it out later.
|
|
Here is the setup:
I create public/private key pair with .NET, I want to sign a string. I take a random string, get a byte[] from it, sign it, and take the signature in the java app. I want to verify it in java ( (!)I'm talking about Android's java).
...
Started by Danail on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
From .NET to Java format do something like this (untested, but should be mostly correct):
public byte + 6, complementTwoS.Length); return res; } public byte[] ToComplementTwo(byte[] d){ // Ensure the top.
|
|
I have a follow up question to Given a private key, is it possible to derive it’s public key?
Are the public and the private keys the 'same' (in the sense that you just choose to make one public) or can you do more with the private key than with the public...
Started by chris on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
An important element to the public key system....
Jane then uses her private key to decrypt it.
That uses two keys -- a public key known to everyone and a private or secret key known only to the recipient to encrypt the message.
|
Ask your Facebook Friends
|
Hello all,
I have private pdb file and I have to convert it to a public one. Is there tool for it?
Thank you in advance.
Started by msh on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
If you.
Huh? .pdb files contain debug information - there's nothing private or public about them.
|
|
Is it wrong to use m_varname as public and the same class with _variable as private
Started by yesraaj on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
You should public....
Why would you obfuscate it with "_"?
As for using the same names for public and private in the same class? Make it private, name it perfectly and give getters and setters public.
That it is perfect.
|
|
How do I create RSA public\private key pair file in Windows?
Started by NotDan on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at superuser):
I usually do ssh-keygen -t rsa -b 4096
gpg4win is a windows port of gpg. .
John T + or if using something like msys/cygwin you can use openssh's ssh-keygen .
You can use PuTTYgen to make a key pair.
|
|
Which access specifier( public private ) is preferred when dealing with multiple (100) threads? I have heard that private is better.
Is it true?
Started by Woland on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Basically it's a good idea to implement everything private or internal as long as you don't have any strong reason to make it public, in other words to expose stuff even though it's private....
Descendants of the class (overriding).
|
|
I just stumbled over this in some C# code...:
public Foo Foo { get; private set; }
How can I do the same thing in vb?
Started by Kjensen on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
End Set End....
End Get Private Set(ByVal _Foo As SomeType Public Property Foo() As SomeType Get Return _Foo End Get Private Set(ByVal value value As Foo) ...
Of course (smacks forehead)...:
Public Property Foo() As Foo Get ...
|
|
Can I call public method from within private one:
var myObject = function() { var p = 'private var'; function private_method1() { // can I call public mehtod "public_method1" from this(private_method1) one and if yes HOW? } return { public_method1: function...
Started by krul on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Do something like:
var myObject = function() { var p = 'private var'; function private_method1() { public.public_method1() } var public = { public_method1: function() { alert('do stuff') }, public_method2: function() { private_method1() ....
|
|
What's the simplest way to get XmlSerializer to also serialize private and "public const" properties of a class or struct? Right not all it will output for me is things that are only public. Making it private or adding const is causing the values to not...
Started by Adam Haile on
, 7 posts
by 7 people.
Answer Snippets (Read the full thread at stackoverflow):
If you need more control, you can/deserialize private members....
Keep your fields still private, maybe you can;
private string myField; public string MyField { getXmlSerializer only looks at public fields and properties.
|