Results 1 to 5 of 5

Thread: What are the Operators and Expressions in C# ?

  1. #1
    Join Date
    Jul 2006
    Posts
    442

    What are the Operators and Expressions in C# ?

    Hello friends,
    I have recently started doing the C#. Before that I learnt C and C++ programming language. I think that the logic of the operators and expressions in C# should be same as the C and C++ programming language. But I am not confirmed about that.!! Please tell me what are the Operators and Expressions in C# .?? If you provide me the coding for the same, it would be easy for me to understand.!!
    "When they give you ruled paper, write the other way..." J.R.J.

  2. #2
    Join Date
    Nov 2008
    Posts
    996

    Re: What are the Operators and Expressions in C# ?

    A sequence of one or more operands and zero or more operators is an expression. This expression can be evaluated to a single value, object, method, or namespace. A method invocation, a literal value, an operator can be included in the expressions. Simple names can be the name of a variable, type member, method parameter, namespace or type. The expression can range from simple to very complex. Operators that are used in expressions can use the other expressions as parameters. Hope that you got what is expressions.!!

  3. #3
    Join Date
    Mar 2008
    Posts
    349

    Re: What are the Operators and Expressions in C# ?

    The primary expression operators are important category of operators. The following are the list of the expressions that are commonly used :
    • (x) - This form of the parenthesis operator is used to control precedence, either in mathematical operations or in method calls.
    • x.y - The "dot" operator is used to specify a member of a class or structure where x represents the containing entity and y represents the member.
    • a[x] - Square brackets are used to index into an array.
    • f(x) - This form of the parenthesis operator is used to list the arguments to a method.

  4. #4
    Join Date
    Feb 2008
    Posts
    1,852

    Re: What are the Operators and Expressions in C# ?

    An operator, two operands and an assignment makes the basic expression. I have given you an example of expression, so that it would be easy for you to understand, what is an expression :
    Code:
    int Sum = 10 + 20;
    In the above example, that I have mentioned, consists of the (+) operator which is used to add two operands (10 and 20) together. The assignment operator (=) subsequently assigns the result of the addition to an integer variable named Sum.

  5. #5
    Join Date
    May 2008
    Posts
    2,297

    Re: What are the Operators and Expressions in C# ?

    Like C and C++, C# also provides a range of operators for the purpose of creating mathematical expressions. The following operator can be used in C# :

Similar Threads

  1. What are an expressions used in python?
    By Atsushi in forum Software Development
    Replies: 4
    Last Post: 31-12-2010, 12:46 AM
  2. What are an Expressions in PHP?
    By michaels in forum Software Development
    Replies: 5
    Last Post: 05-03-2010, 05:44 AM
  3. Question on regular expressions
    By Logan 2 in forum Software Development
    Replies: 5
    Last Post: 12-02-2010, 04:21 AM
  4. Regular Expressions in Java
    By Ash maker in forum Software Development
    Replies: 5
    Last Post: 03-02-2010, 04:42 AM
  5. What are the Elements of Coldfusion Expressions
    By Demetrius in forum Software Development
    Replies: 3
    Last Post: 30-03-2009, 10:57 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,716,222,440.09666 seconds with 17 queries