GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Microsoft  >  C#
Go To First  |  Previous Question  |  Next Question 
 C#  |  Question 377 of 436    Print  
which an instance constract of a struct type, which one of the following key workds behaves exactly as an output parameter of the struct type?

1) value
2) ref
3) object
4) this

  
Total Answers and Comments: 1 Last Update: March 05, 2007     Asked by: vsateeshk 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
March 05, 2007 10:21:21   #1  
Sung        

RE: which an instance constract of a struct type, whic...
It is "This"
 
Is this answer useful? Yes | No

 Related Questions

The difference is that static read-only can be modified by the containing class, but const can never be modified and must be initialized to a compile time constant. To expand on the static read-only case 
Latest Answer : As static read-only variables must be initialized in the static constructor (static constructor cannot have parameters and it cannot be called manually), it is efficient to used const variables over static read-only variables if you know the values ...

Use a conditional attribute on the method, as shown below: class Debug{[conditional("TRACE")]public void Trace(string s){Console.WriteLine(s);}}class MyClass{public static void Main(){Debug.Trace("hello");}}In 
Latest Answer : Well, you cant add the namespace System.Diagnostics.ConditionalAttribute. Actually you need to add the namespace System.Diagnostics and capitalise "Conditional" like so:using System;using System.Diagnostics;namespace Debug{    class ...

C# has the is operator: expr is type  
Latest Answer : EX:==============using System; class ClassA {} public class TestIs{   public static void Test (object o)    {      ClassA a = null;       if (o is ClassA)       ...

If you leave off the return type on a method declaration, the compiler thinks you are trying to declare a constructor. So if you are trying to declare a method that returns nothing, use void. The following 
Latest Answer : If your method does not have any return type then mention void before that method or return 0 ...

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 ...

Make sure that the target type set in the project properties setting is set to Windows Application, and not Console Application. If you're using the command line, compile with /target:winexe & 
Latest Answer : Compile with following syntax at command line     :      csc /t:winexe ...

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 ...

No. However, there are plans for C# to support a type of template known as a generic. These generic types have similar syntax but are instantiated at run time as opposed to compile time. You can read more 
Latest Answer : Generics are a new feature in version 2.0 of the C# language and the common language runtime (CLR). Generics introduce to the .NET Framework the concept of type parameters, which make it possible to design classes and methods that defer the specification ...

I was trying to use an "out int" parameter in one of my functions. How should I declare the variable that I am passing to it?
You should declare the variable as an int, but when you pass it in you must specify it as 'out', like the following: int i;foo(out i);where foo is declared as follows: [return-type] foo(out int 


 Sponsored Links

 
Related Articles

C++ Standard Input Output Stream

C Standard Input Output Stream In this C tutorial you will learn about standard input stream and standard output stream explained along with syntax and examples C programming language uses the concept of streams to perform input and output operations using the keyboard and to display information on
 

Type Conversions in C++

Type Conversions in C In this C Tutorial you will learn about Type Conversions in C What is Type Conversion How to achieve this Automatic Conversion otherwise called as Implicit Conversion and Type casting otherwise called as Explicit Conversion mosgoogle What is Type Conversion It is the process of
 

XML - Elements in Document Type Definitions (DTD)

XML Elements in Document Type Definitions DTD In this tutorial you will learn about Elements in DTD Elements child elements nested elements declaring elements with character data only declaring elements with mixed content declaring elements with any content declaring elements with no content and ele
 

XML - Document Type Definitions (DTD)

XML Document Type Definitions DTD In this totuorial you will learn about XML Document Type Definitions DTD Need DTD Types Of DTD’ s Internal DTD External DTD mosgoogle NEED XML documents can contain many different types of markups including elements attributes and entity references Whate
 

WebSphere V5.0 : Running Applications - Create server instance and server configuration

WebSphere V5 0 Running Applications Create server instance and server configuration In this tutorial you will learn about WebSphere V5 0 Running Applications Create server instance and server configuration Creating a server and server configuration mosgoogle Creating a server and server configuratio
 

C Programming - Managing Input and Output Operations

C Programming Managing Input and Output Operations In this tutorial you will learn about Single character input output String input and output Formatted Input For Scanf Input specifications for real number Input specifications for a character Printing One Line Conversion Strings and Specifiers Speci
 

. NET Type Safety

NET Type Safety This Article discusses What is Type Safety in the context of NET What is Type Safety How does Type Safety affect us Why is Type Safety Important Writing Type Safe Code How is Type Safety ensured What is Verifiable Type Safe Code Verification process How to determine if the code is
 

SQL Server 2000: Creating Stored Procedure with Input and Output Parameters

This tutorial explains how to create and use Stored Procedures with Input Parameters and output parameters along with the screen shots and sample code Creating Stored Procedure with Input Parameters mosgoogle Input Parameters in Stored Procedures are placeholders for data that the user needs to send
 

Data Type

Data Type  describes how data should be represented interpreted and how the values should be structured or how objects are stored in the memory of the computer.  It  refers to the form of a data value and constraints placed on data interpretation The form of data value&a
 

. NET Type Safety

. NET Type Safety This Article discusses What is Type Safety in the context of .NET What is Type Safety How does Type Safety affect us Why is Type Safety Important Writing Type-Safe Code. How is Type Safety ensured What is Verifiable Type Safe Code Verification process How to determine if the cod
 

About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape