|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hello...
Im having some problem with type casting... I want to uniquely identify int value to the database field Cat_ID by using System.Guid. here is the code snap..: ////////////////////Code////////////////////////////// private void btnAdd_Click(object sender, System.EventArgs e) { if ( IsValid ) { try { System.Guid i; i = new System.Guid ( ( IstParentCatagory.Items[IstParentCatagory.SelectedIndex].Value ) ); CatalogDS.CatagoryRow CatRow = catds.Catagory.NewCatagoryRow ( ); CatRow.Cat_ID = System.Guid.NewGuid ( ); //Error Cannot implicitly convert to System.Guid to int I have tried Convert.ToInt16, int32 and even ToUInt16 and 32...! but doesnt work...! I'll be very thankful to you... ![]() ______________ Regards... 27 |
![]() |
| Viewing: Dev Articles Community Forums > Programming > .NET Development > Type Casting Error using System.Guid |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|