|
I have form with button and checkbox. if i hit button static void is called which call non static void which shows messagebox with the checkbox.checked.toString() The problem is if i change the checkbox value it always shows false
Code is
using System...
Started by Woland on
, 8 posts
by 8 people.
Answer Snippets (Read the full thread at stackoverflow):
Method takes the current form as a parameter
static void x(Form1 theForm) { theForm.y(); } private();
Try
public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void()); } static void....
|
|
Does anyone know how to use a void pointer to generate a 2D array rather than an int pointer?
For integer pointer, I do as follow:
int **m; m = new int* [row]; for(int i=0; i< row; i++) m[i] = new int[col]; for (int i = 0; i < row; i++) for (int...
Started by zhen on
, 8 posts
by 8 people.
Answer Snippets (Read the full thread at stackoverflow):
With a ....
private: int row; int col; void** m; }
Code to initialize the rows of the table could be something(); private: int row; int col; void***m; void initMatrix(); // Initialize the storage for row and column.
|
|
Hi,
What is the difference between using Private Properties instead of Private Fields
private String MyValue { get; set; } // instead of private String _myValue; public void DoSomething() { MyValue = "Test"; // Instead of _myValue = "Test"; }
Is there...
Started by Yoann. B on
, 7 posts
by 7 people.
Answer Snippets (Read the full thread at stackoverflow):
The provision for a property to be private....
You would seldom want to make a property private.
private List<Item> _children; public void Add(Item child) { if (child._parent != null) { throw to be protected, for instance.
|
Ask your Facebook Friends
|
Hi,
I am trying to access member variables of a class without using object. please let me know how to go about.
class TestMem { int a; int b; public: TestMem(){} void TestMem1() { a = 10; b = 20; } }; void (TestMem::*pMem)(); int main(int argc, char* ...
Started by mahesh on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
Class TestMem { public: int a; int b; TestMem(){} void TestMem1() { a = 10; b = 20; } }; void* offset(void* ptr, ...) { va_list ap; va_start(ap, ptr); // get 1st argument's address long i = va_arg(ap, long); // get next argument....
|
|
Given this C API declaration how would it be imported to C#?
int _stdcall z4ctyget(CITY_REC *, void *);
I've been able to get this far:
[DllImport(@"zip4_w32.dll", CallingConvention = CallingConvention.StdCall, EntryPoint = "z4ctygetSTD", ExactSpelling...
Started by thelaughingdm on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
For the void* parameter you can just use an IntPtr
[DllImport(@"zip4_w32.dll", CallingConvention = CallingConvention.StdCall, EntryPoint = "z4ctygetSTD", ExactSpelling = false)] private extern static int z4ctygetSTD(ref CITY_REC args, IntPtr....
|
|
Just starting out with Rhino Mocks and im having a very simple problem, how do I mock a class with a void which sets a property?
class SomeClass : ISomeClass { private bool _someArg; public bool SomeProp { get; set; } public SomeClass(bool someArg) { ...
Started by Lee Treveil on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
[Test] public void SomeTest() { MockRepository] public void SomeMethodTest....
(); delegate void methodDelegate(); private bool m_MockPropValue = false; [Test] public void SomeTest about it and write out some dumb expect statements.
|
|
I have the following method, and I want to know if there is anything that can go in place default(void) below because there is a compiler error that says that void is not valid here:
private void applyDefaultsIfNecessary(ApplicationConfiguration configuration...
Started by Raghu Dodda on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
Any tricks you come....
From a language standpoint, void means "does not exist", which begs the question: what of pointless brevity.
The Action class produces no result)
Like that.
Hey,
default doesn't work with void; but it works with a type.
|
|
The webservice that I am calling from my application has two methods.
XmlNode getCase(string parameter) // synchronous void getCaseAsync(string parameter) //async I can simply call method 1 and store the results in an xmlnode like this,
XmlNode node=webservice...
Answer Snippets (Read the full thread at stackoverflow):
If it doesn't return anything the method return type to something... .
This:
private void DoSomethingComplete(object sender, AsyncCompletedEventArgs e) { // Handle the resultIf method return type is void it means it doesn't return anything.
|
|
I have a defined a custom error domain that I want to publish in a protocol. The domain is defined in the implementation file like this:
//in the .m file static void *MyErrorDomain = (void *)@"MyErrorDomain";
The .h file implements a protocol, and I would...
Started by Elise van Looij on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Just make a normal definition in your .m :
void *MyErrorDomain = @"MyErrorDomain";
And make an extern declaration in your .h....
You do not want to use static here.
It is like asking for access to a private member from another class.
Sense.
|
|
How to make mock void methods.I performed observer pattern but i cant mock with mockito because i dont know the mock way with mockito.And i search from the internet i cant find properly sample. My class looks like
public class World{ List<Listener&...
Started by egebilmuh on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Presuming.
DoAnswer(),doNothing(),doReturn() family of methods from mockito framework to mock void methods.
|