none
Vector type in .NET

    Question

  • Hi all,

    I thought there was no built in vector data type in .NET, but in the help it shows that there is:

    http://msdn2.microsoft.com/en-us/library/system.windows.vector.aspx

    I still can't find a way to create one though. Is this real?




    Thanks,
    Aw
    Tuesday, September 18, 2007 7:24 PM

Answers

  • You need to have .Net 3 installed and specifically have WPF. Otherwise take a look at this article if you want to use a third party A Vector Type for C#.
    Tuesday, September 18, 2007 7:43 PM
  • As for WPF and .net 3.0 it is available right now, you will have to download extensions for 2005 to develop in it (if I remember correctly, just search msdn for 2005 extensions or something) or you can look at getting the VS 2008 Beta 2 which can handle 2.0, 3.0, and 3.5.

    Also note that there are potentially different "Vectors" out there. It looks like the System.Windows.Vector (.net 3.0) is the math/graphics vector and should be highly useful. This is however nothing like the standard Java Vector (ArrayList-ish style storage).
    Tuesday, September 18, 2007 9:52 PM

All replies

  • You need to have .Net 3 installed and specifically have WPF. Otherwise take a look at this article if you want to use a third party A Vector Type for C#.
    Tuesday, September 18, 2007 7:43 PM
  • Thanks man, now I see.

    I also have seen XNA has lots stuff for this. Do you know if or when it will be available for use with VS professional edition? There is no point for me to duplicate the functionality by myself.



    Thanks,
    Aw
    Tuesday, September 18, 2007 9:18 PM
  • As for WPF and .net 3.0 it is available right now, you will have to download extensions for 2005 to develop in it (if I remember correctly, just search msdn for 2005 extensions or something) or you can look at getting the VS 2008 Beta 2 which can handle 2.0, 3.0, and 3.5.

    Also note that there are potentially different "Vectors" out there. It looks like the System.Windows.Vector (.net 3.0) is the math/graphics vector and should be highly useful. This is however nothing like the standard Java Vector (ArrayList-ish style storage).
    Tuesday, September 18, 2007 9:52 PM
  • Thanks alot again.

    To me it looks like .NET's vectors look basic, no? I thought XNA's version is deep enough. I wonder if it will make its way to VS pro edition, because right now you have to use game studio express, which is unreasonable, as people could use these libraries for other things in addition to only games.

    This java vector sounds interesting, I will check out what it does.




    Thanks again,
    Aw
    Tuesday, September 18, 2007 10:31 PM
  • I have checked java's vector, and it looks like C#'s arraylist (like you said)? From what I heard, growing arrays aren't performance friendly, right? What advantage this ones has?




    Thanks,
    Aw
    Tuesday, September 18, 2007 10:44 PM
  • That is a discussion for another thread Wink

    In general, a growing array is useful when you don't know how many elements you might have, which is a very real situation. There are ways to optimize the expansion of arrays, so having an expandle array type will be cheaper than just expanding a fixed-length array when you reach the maximum capisity. Some languages default to using variable sized arrays rather than fixed length arrays.

    The point I was trying to make is you never specified which Vector type, you could be wanting a vector that's used in math/graphics or a Vector type like the Java Vector, or you could be wanting something entirely different. With the links and other information one can gather that you're wanting the math/graphic style vector (which the xna(I'm assuming)/System.Windows.Vector/3rd party Vector is)
    Tuesday, September 18, 2007 11:07 PM
  • Thanks man you are right Smile

    I hope I can get access to XNA in visual studio pro soon, that's all I can hope.




    Thanks,
    Aw
    Tuesday, September 18, 2007 11:20 PM
  •  Azurewrath wrote:
    Thanks man you are right

    I hope I can get access to XNA in visual studio pro soon, that's all I can hope.


    Thanks,
    Aw


    That is a question for the XNA people. Post it at XNA Forums and let us know what you find out!
    Wednesday, September 19, 2007 2:13 PM
  • Actually I did or I read somewhere on that forum that it will be done, for VS 2008 + XNA 2.0 (?), which makes TOTAL sense.

    Man I look forward to it Smile




    Aw
    Wednesday, September 19, 2007 3:48 PM