4
Answers

How to compare two different table in sql server 2005 using the primary key in csharp?

Photo of Black Diamond

Black Diamond

13y
1.3k
1
I have a problem in comparing two different tables in one database in  sql server 2005  in csharp to prevent duplication entries....can anybody help to code my problem?,thanks and godbless..

Answers (4)

0
Photo of Nilanka Dharmadasa
NA 5.2k 0 15y

Hi Friend,
 
As I feel, what you have done is correct. If you change the size of the matrix then definetely you will have to reassign the values of each and every pixel. I dont think you can stop that by using another way.
 
You can use a class like this. So you can set the values from outside according to OOP concepts.
 

public class MyImage
{
 private int _ImageSize = 16;
 private double[,] _Matrix;
public MyImage(int imgsize)
{
      _ImageSize = imgsize;
      _Matrix = new double[_ImageSize, _ImageSize];
}

 
 
 

 public double this[int x, int y]
 {
  get { return _Matrix[x, y]; }
  set { _Matrix[x, y] = value; }
 }
}

 
Mark Do you like this answer checkbox if this helps you.