Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
A

av7254

@av7254
About
Posts
4
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Getting a value from a constructor
    A av7254

    Thanks! i have solved this thing it is realy preety simple :) public class Matrika { public int mat_x; public int mat_y; public Array matrika; public Matrika(int x, int y) { //i needed to save separated x and y and create 2D array mat_x = x; mat_y = y; matrika = Array.CreateInstance(typeof(int), x, y); { But, why did you say that public atributes are no ok?

    C# question data-structures

  • Getting a value from a constructor
    A av7254

    So, how do i make it member of class, that will conatain x=5 and y=5 in this case. "polzisce" has to be object wich contains a 2d array wich is specified with this Matrika polzisce = new Matrika(5,5); Tnx for your answers :)

    C# question data-structures

  • Getting a value from a constructor
    A av7254

    your way is simplier but, i want to do it like this. all i want is to get the x and y value from constructor. Use cases: Matrika polzisce = new Matrika(10,20); Matrika polzisce = new Matrika(5,2); maybe: Matrika polzisce = new Matrika(1000,1000); in this case: Matrika polzisce = new Matrika(5,5); Constructor runes first when object is created and contains varibles x=5 and y=5(actualy limits of array). I need those two to create two-dimensional array. I don't know how to access those varibles in the constructor, that i can create 2d array and that object "polzisce" will contain 2d array 5x5 Tnx for all other posts! I appreciate!

    C# question data-structures

  • Getting a value from a constructor
    A av7254

    Hello, I created an object "polzisce" from a class called Matrika(this is class that creates two dimensional array) and it's constructor takes two parameters. Those two parameters are actualy X an Y axis and they are not fixed size. public class Matrika { //constructor public Matrika(int x, int y) { int[,] matrika = new int[x, y]; } } static void Main(string[] args) { Matrika polzisce = new Matrika(5, 5); } The question is: Is object "polzisce" actualy two dimensional array after it is created? How can i get that two-dimensional array "matrika" from constructor? Thanks! Alen.

    C# question data-structures
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups