New Member FAQ
|
Forums
|
Earn Revenue
Resources
Entrance
Ask Experts
Exam Papers
Jobs
English
Projects
Universities
Colleges
Courses
Schools
Training
My India
Members
|
Communities
|
Business Directory
|
Classifieds
|
Reviews
|
Silverlight Games
|
Peer Appraisal
|
Bookmarks
|
Polls
|
Mentors
|
Links
|
Academic Projects
|
Lobby
|
Gift Shop
|
Chat
My Profile
Sign In
Register
AdSense Revenue
Active Members
Today
N K Ravishanka...
(50)
sridevi
(41)
Silamba Kumar ...
(40)
Last 7 Days
Mr. Anindya
(2274)
PROSENJIT MANN...
(2013)
Pawan Bahuguna
(1251)
more...
Awards & Gifts
Online Exams
Aptitude Questions
General Aptitude Tests
Medical Entrance
Engineering Entrance
Bank Tests
TOEFL & IELTS Questions
Fresher Jobs
Our fresher job section is exclusively for fresh graduates! Find jobs for freshers in major Indian cities including Bangalore, Chennai, Hyderabad, Pune or Kochi
Resources
Find educational articles, blogs, discussion threads and other resources.
Colleges
Find details about any college in India or search for courses.
Array Single Operation
Posted Date: Total Responses:
0
Posted By:
Mahesh
Member Level:
Platinum
Points/Cash
: 4
using System;
using System.Collections.Generic;
using System.Collections;
using System.Text;
using BaseTypes;
namespace FormulaEditor
{
public class ArraySingleOperation : IObjectOperation
{
private object returnType;
private ArraySingleOperationType operationType;
public ArraySingleOperation(ArraySingleOperationType operationType, object type)
{
this.operationType = operationType;
ArrayReturnType art = type as ArrayReturnType;
object t = art.ElementType;
if (t is Double)
{
Double a = 0;
returnType = a;
}
}
#region IObjectOperation Members
public int Arity
{
get
{
return 1;
}
}
public object this[object[] x]
{
get
{
double a = 0;
object[] y = x[0] as object[];
if (operationType == ArraySingleOperationType.Sum)
{
for (int i = 0; i < y.Length; i++)
{
a += (double)y[i];
}
return a;
}
if (operationType == ArraySingleOperationType.Product)
{
a = 1;
for (int i = 0; i < y.Length; i++)
{
a += (double)y[i];
}
return a;
}
return null;
}
}
public object ReturnType
{
get
{
return returnType;
}
}
public bool IsPowered
{
get
{
return false;
}
}
#endregion
#region Own Methods
public ArraySingleOperationType Type
{
get
{
return operationType;
}
}
#endregion
}
public enum ArraySingleOperationType
{
Sum, Product
}
}
Project Feedbacks
No feedbacks found. Be the first to respond and make money from
revenue sharing program
.
Post Feedback
You must
Sign In
to post a feedback.
Next Project:
Symbol of date time using C Sharp
Previous Project:
Constructor in C Sharp
Return to Project Index
Post New Project
Related Projects
Time To Double Operation in C Sharp
Shell Sort Implementation - using C++
Performer of derivations
Program to construct a pascal triangle
C++ Program - Nested and parallel scopes
Advertise Here
Contact Us
Advertise
Editors
Privacy Policy
Terms Of Use
ISC Technologies.
2006 - 2009 All Rights Reserved.