-3

Hey ill keep this brief since its a basic question, is there anyway to solve for X using C#

CodeSmile
  • 64,284
  • 20
  • 132
  • 217
Rejnaps
  • 113
  • 2
  • 12
  • 3
    That equation always has one solution: 2. Could you be more precise as to what you are trying to do/solve? – BradleyDotNET Nov 21 '14 at 23:35
  • im just curious if C# has the capabilities to output an answer from -2 + X = 0 but i assume C# would see X as something other then a place holder for the correct Number to Achieve 0 – Rejnaps Nov 21 '14 at 23:43
  • 1
    As in; solve for X in that equation; just given that string? You may want to look at: http://smartmathlibrary.codeplex.com/ The functionality does not exist in pure .NET – BradleyDotNET Nov 21 '14 at 23:44
  • Yes thats what im trying to do i just couldnt think of the correct way to word it, i apologize for the sloppy wording of the question. – Rejnaps Nov 21 '14 at 23:45
  • Thanks for baring with me i think im on the correct path now, if you want to toss in an Answer i can mark it as The correct Answer after i reword the question. – Rejnaps Nov 21 '14 at 23:48

1 Answers1

2

There is no built in way to solve equations in .NET. Symbolic equation parsing/solving is something for advanced math libraries (heck, it wasn't even in TI calculators until the TI-89).

The following libraries may be of use:

http://smartmathlibrary.codeplex.com/

http://mathnetnumerics.codeplex.com/

BradleyDotNET
  • 60,462
  • 10
  • 96
  • 117