![]() |
| Home | Tech FAQ | Interview Questions | Placement Papers | Tech Articles | Learn | Freelance Projects | Online Testing | Geeks Talk | Job Postings | Knowledge Base | Site Search | Add/Ask Question |
![]() Related Questions C# requires only a single parameter for delegates: the method address. Unlike other languages, where the programmer must specify an object reference and the method to invoke, C# can infer both pieces of Latest Answer : This article is good.IntroductionIn this article I am going to share my knowledge on Delegates in C#.This would explain the Delegate using simple examples so that the beginner can understand the same.What is Delegate?Definition:Delegate is type which ... Yes. Set all references to null and then call System.GC.Collect().If you need to have some objects destructed, and System.GC.Collect() doesn't seem to be doing it for you, you can force finalizers Latest Answer : GC.Collect();It is recomended that you should not forcefully call the GC. GC does it in the optimal way, since it knows the inner details like which object actually created inner objects.But some case you may need to force GC to free the scarce memory ... No. C# does not have macros. Keep in mind that what some of the predefined C macros (for example, __LINE__ and __FILE__) give you can also be found in .NET classes like System.Diagnostics (for example, Latest Answer : Ans:No ... Here's a quick example of the DllImport attribute in action: using System.Runtime.InteropServices;class C{[DllImport("user32.dll")]public static extern int MessageBoxA(int h, string m, string Latest Answer : ans:by using1st:using System.Runtime.InteropServicessecond step[DllImport("user32.dll")]use top of the class ... Yes. Here's a simple example: using System;class Class1 {private string[] MyField;public string[] MyProperty {get { return MyField; }set { MyField = value; }}}class MainClass{public static int Main(string[] Latest Answer : yes u can use indexer.its working is same as properties. ... You must use the Missing class and pass Missing.Value (in System.Reflection) for any values that have optional parameters. Latest Answer : Ans:Yes,it is right.Answer: You must use the Missing class and pass Missing.Value (in System.Reflection) for any values that have optional parameters. ... The easiest way is to use goto: using System;class BreakExample {public static void Main(String[] args) {for(int i=0; i Latest Answer : Yes, there are ways to break out of nested loops. Although GOTO is allowed in C#, it is normally a bad idea, bad style, and indication of lack of good software development foundation of those who use it (no offense intended).Here are a couple of ... Here's an example: using System;class StringToInt{public static void Main(){String s = "105";int x = Convert.ToInt32(s);Console.WriteLine(x);}} Latest Answer : Ans:by using onvert.ToInt32(string)ExampleString s = "45";int x = Convert.ToInt32(s); ... Yes, you can use System.Environment.Exit(int exitCode) to exit the application or Application.Exit() if it's a Windows Forms app. Latest Answer : Ans:YesSystem.Environment.Exit(int exitCode) to exit the application or Application.Exit() if it's a Windows Forms app. ... Global attributes must appear after any top-level using clauses and before the first type or namespace declarations. An example of this is as follows: using System;[assembly : MyAttributeClass]class X Latest Answer : ans:Yes,it is right. ...
Sponsored Links
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||