Top "Methods" questions

A method is a block of code that performs a task and is associated with a class or an object.

How to check whether an object has certain method/property?

Using dynamic pattern perhaps? You can call any method/property using the dynamic keyword, right? How to check whether the …

c# .net methods reflection properties
How to get instance variables in Python?

Is there a built-in method in Python to get an array of all a class' instance variables? For example, if …

python methods instance-variables
How to call a method daily, at specific time, in C#?

I've searched on SO and found answers about Quartz.net. But it seems to be too big for my project. …

c# winforms methods scheduled-tasks
Android: How can I pass parameters to AsyncTask's onPreExecute()?

I use an AsyncTask for loading operations that I implemented as an inner class. In onPreExecute() I show a loading …

android methods parameters android-asynctask
Why are exclamation marks used in Ruby methods?

In Ruby some methods have a question mark (?) that ask a question like include? that ask if the object in …

ruby methods naming-conventions immutability
Python safe method to get value of nested dictionary

I have a nested dictionary. Is there only one way to get values out safely? try: example_dict['key1'][…

python dictionary methods except
Declaration of Methods should be Compatible with Parent Methods in PHP

Strict Standards: Declaration of childClass::customMethod() should be compatible with that of parentClass::customMethod() What are possible causes of this …

php methods standards-compliance
Can I invoke an instance method on a Ruby module without including it?

Background: I have a module which declares a number of instance methods module UsefulThings def get_file; ... def delete_file; ... …

ruby module methods
Why can't I call a public method in another class?

I have got these two classes interacting and I am trying to call four different classes from class one for …

c# methods call
Can two Java methods have same name with different return types?

Can two Java methods have the same name with different return type? The return type of the methods are different …

java methods return-type