Nota
Capaian ke halaman ini memerlukan kebenaran. Anda boleh cuba mendaftar masuk atau menukar direktori.
Capaian ke halaman ini memerlukan kebenaran. Anda boleh cuba menukar direktori.
Cannot convert type 'type' to 'type'
There is no predefined conversion between types. You can define a custom conversion between those types. For more information, see User-defined conversion operators.
The following sample generates CS0030:
// CS0030.cs
namespace x
{
public class iii
{
/*
public static implicit operator iii(int aa)
{
return null;
}
public static implicit operator int(iii aa)
{
return 0;
}
*/
public static iii operator ++(iii aa)
{
return (iii)0; // CS0030
// uncomment the conversion routines to resolve CS0030
}
public static void Main()
{
}
}
}
Bekerjasama dengan kami di GitHub
Sumber untuk kandungan ini boleh didapati di GitHub, di mana anda juga boleh mencipta dan menyemak isu dan menarik permintaan. Untuk maklumat lanjut, lihat panduan penyumbang kami.